pub struct InteractiveStepHook;Expand description
A hook that pauses the simulation at each tick to allow for interactive inspection.
Trait Implementations§
Source§impl<E, M: Model<E>> Hook<E, M> for InteractiveStepHook
impl<E, M: Model<E>> Hook<E, M> for InteractiveStepHook
Source§fn before_simulation(&self, _model: &M)
fn before_simulation(&self, _model: &M)
Invoked immediately before the simulation starts.
Source§fn after_simulation(&self, _model: &M, _end_tick: SimTime)
fn after_simulation(&self, _model: &M, _end_tick: SimTime)
Invoked immediately after the simulation finishes.
Source§fn before_tick(
&self,
_model: &M,
current_tick: SimTime,
skipped_duration: Duration,
)
fn before_tick( &self, _model: &M, current_tick: SimTime, skipped_duration: Duration, )
Invoked at the beginning of a tick process. Read more
Source§fn after_tick(
&self,
_model: &M,
current_tick: SimTime,
last_micro_step: MicroStep,
)
fn after_tick( &self, _model: &M, current_tick: SimTime, last_micro_step: MicroStep, )
Invoked immediately after a tick process has completed.
Source§fn before_micro_step(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
)
fn before_micro_step( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, )
Invoked at the beginning of a micro-step.
Source§fn after_micro_step(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
)
fn after_micro_step( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, )
Invoked at the end of a micro-step.
Source§fn on_discard_remain_micro_step(
&self,
_model: &M,
_current_tick: SimTime,
_first_discarded_micro_step: MicroStep,
_discarded_sources: &[SourceReadyEntry],
_discarded_events: &[Event<E>],
)
fn on_discard_remain_micro_step( &self, _model: &M, _current_tick: SimTime, _first_discarded_micro_step: MicroStep, _discarded_sources: &[SourceReadyEntry], _discarded_events: &[Event<E>], )
Invoked when remaining tasks (events or sources) are discarded due to execution limits.
Source§fn before_register_source(&self, _model: &M, _name: &str)
fn before_register_source(&self, _model: &M, _name: &str)
Invoked when a source registration begins.
Source§fn after_register_source(&self, _model: &M, _name: &str)
fn after_register_source(&self, _model: &M, _name: &str)
Invoked when a source registration completes.
Source§fn before_source_phase(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
)
fn before_source_phase( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, )
Invoked at the beginning of the source processing phase.
Source§fn before_source(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_source_view: &SourceView,
)
fn before_source( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _source_view: &SourceView, )
Invoked immediately before an individual source fires.
Source§fn after_source(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_source_view: &SourceView,
_computed_next_fire: Option<SimTime>,
)
fn after_source( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _source_view: &SourceView, _computed_next_fire: Option<SimTime>, )
Invoked immediately after an individual source fires.
Source§fn cancel_source(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_scheduled_at: SimTime,
_source_view: &SourceView,
)
fn cancel_source( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _scheduled_at: SimTime, _source_view: &SourceView, )
Invoked when a scheduled source is canceled.
Source§fn discard_source(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_source_view: &SourceView,
)
fn discard_source( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _source_view: &SourceView, )
Invoked when a source is explicitly discarded.
Source§fn after_source_phase(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
)
fn after_source_phase( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, )
Invoked at the end of the source processing phase.
Source§fn before_event_phase(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
)
fn before_event_phase( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, )
Invoked at the beginning of the event processing phase.
Source§fn before_event(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_event: &Event<E>,
)
fn before_event( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _event: &Event<E>, )
Invoked immediately before an event is processed.
Source§fn after_event(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_event: &Event<E>,
)
fn after_event( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _event: &Event<E>, )
Invoked immediately after an event is processed.
Source§fn cancel_event(
&self,
_model: &M,
_current_tick: SimTime,
_current_micro_step: MicroStep,
_scheduled_at: SimTime,
_event: &Event<E>,
)
fn cancel_event( &self, _model: &M, _current_tick: SimTime, _current_micro_step: MicroStep, _scheduled_at: SimTime, _event: &Event<E>, )
Invoked when a scheduled event is canceled.
Auto Trait Implementations§
impl Freeze for InteractiveStepHook
impl RefUnwindSafe for InteractiveStepHook
impl Send for InteractiveStepHook
impl Sync for InteractiveStepHook
impl Unpin for InteractiveStepHook
impl UnsafeUnpin for InteractiveStepHook
impl UnwindSafe for InteractiveStepHook
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