pub trait MachineTransitionRecorder: MachineStateIdentity {
// Provided methods
fn try_record_transition(
transition: Self::TransitionId,
chosen: Self::StateId,
) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>> { ... }
fn try_record_transition_to<Next>(
transition: Self::TransitionId,
) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
where Next: MachineStateIdentity<StateId = Self::StateId, TransitionId = Self::TransitionId> { ... }
}Expand description
Runtime recording helpers layered on top of static machine introspection.
Provided Methods§
Sourcefn try_record_transition(
transition: Self::TransitionId,
chosen: Self::StateId,
) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
fn try_record_transition( transition: Self::TransitionId, chosen: Self::StateId, ) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
Records a runtime transition if transition is valid from Self::STATE_ID
and chosen is one of its legal target states.
Sourcefn try_record_transition_to<Next>(
transition: Self::TransitionId,
) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
fn try_record_transition_to<Next>( transition: Self::TransitionId, ) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
Records a runtime transition using a typed target machine state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.