Skip to main content

MachineTransitionRecorder

Trait MachineTransitionRecorder 

Source
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§

Source

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.

Source

fn try_record_transition_to<Next>( transition: Self::TransitionId, ) -> Option<RecordedTransition<Self::StateId, Self::TransitionId>>
where Next: MachineStateIdentity<StateId = Self::StateId, TransitionId = 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.

Implementors§