pub struct ActiveExecutorContext<E, M: Model<E>> { /* private fields */ }Expand description
Context for tick processing where micro-steps can be executed.
Implementations§
Source§impl<E, M: Model<E>> ActiveExecutorContext<E, M>
impl<E, M: Model<E>> ActiveExecutorContext<E, M>
Sourcepub fn begin_micro_step(
self,
model: &M,
) -> MicroStepHandler<ActiveExecutorContext<E, M>>
pub fn begin_micro_step( self, model: &M, ) -> MicroStepHandler<ActiveExecutorContext<E, M>>
Initiates micro-step processing.
Sourcepub fn end_tick_with_increment_tick(self, model: &M) -> ExecutorContext<E, M>
pub fn end_tick_with_increment_tick(self, model: &M) -> ExecutorContext<E, M>
Ends the current tick and advances to the next tick by incrementing by 1.
Sourcepub fn end_tick_with_jump_to_next_tick(self, model: &M) -> ExecutorContext<E, M>
pub fn end_tick_with_jump_to_next_tick(self, model: &M) -> ExecutorContext<E, M>
Ends the current tick and jumps to the next tick based on scheduled events or sources. If no further scheduled times are found, defaults to incrementing by 1.
Sourcepub fn discard_remain_micro_step(
&mut self,
model: &M,
) -> (VecDeque<SourceReadyEntry>, VecDeque<Event<E>>)
pub fn discard_remain_micro_step( &mut self, model: &M, ) -> (VecDeque<SourceReadyEntry>, VecDeque<Event<E>>)
Discards any remaining micro-steps in the current tick.
§Returns
A pair containing the discarded sources and events.
Auto Trait Implementations§
impl<E, M> Freeze for ActiveExecutorContext<E, M>
impl<E, M> !RefUnwindSafe for ActiveExecutorContext<E, M>
impl<E, M> !Send for ActiveExecutorContext<E, M>
impl<E, M> !Sync for ActiveExecutorContext<E, M>
impl<E, M> Unpin for ActiveExecutorContext<E, M>where
E: Unpin,
impl<E, M> UnsafeUnpin for ActiveExecutorContext<E, M>
impl<E, M> !UnwindSafe for ActiveExecutorContext<E, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more