Struct aper::StateMachineContainerProgram [−][src]
pub struct StateMachineContainerProgram<SM: StateMachine>(pub SM);Expand description
A StateProgram implementation that can be built from any StateMachine. Transitions are stripped of their metadata and passed down to the underlying state machine.
Tuple Fields
0: SMTrait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Transition = TransitionEvent<SM::Transition>
type Transition = TransitionEvent<SM::Transition>
The StateMachine::Transition type associates another type with this state machine as its transitions. Read more
Update the state machine according to the given Transition. This method must be deterministic: calling it on a clone of the state with a clone of the Transition must result in the same state, even at a different time and on a different machine. This is the requirement that allows Aper to keep the state in sync across multiple machines. Read more
type T = SM::Transition
A state machine may “suspend” an event which occurs at a specific time in the future. This is useful for ensuring that the state is updated at a future time regardless of a user-initiated state change before then. State machines that only change state as a result of user-initiated events can ignore this method, as the default implementation is to never suspend an event. Read more
Auto Trait Implementations
impl<SM> RefUnwindSafe for StateMachineContainerProgram<SM> where
SM: RefUnwindSafe,
impl<SM> Send for StateMachineContainerProgram<SM>
impl<SM> Sync for StateMachineContainerProgram<SM>
impl<SM> Unpin for StateMachineContainerProgram<SM>
impl<SM> UnwindSafe for StateMachineContainerProgram<SM> where
SM: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more