pub struct StateMachineContainerProgram<SM>(pub SM)
where
SM: Aper + Send + Sync + 'static,
<SM as Aper>::Intent: Send;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§
Source§impl<SM> Aper for StateMachineContainerProgram<SM>
impl<SM> Aper for StateMachineContainerProgram<SM>
Source§impl<SM> AperSync for StateMachineContainerProgram<SM>
impl<SM> AperSync for StateMachineContainerProgram<SM>
Source§impl<SM> StateProgram for StateMachineContainerProgram<SM>
impl<SM> StateProgram for StateMachineContainerProgram<SM>
type T = <SM as Aper>::Intent
fn new() -> Self
Source§fn suspended_event(&self) -> Option<IntentEvent<Self::T>>
fn suspended_event(&self) -> Option<IntentEvent<Self::T>>
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> Freeze for StateMachineContainerProgram<SM>where
SM: Freeze,
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>where
SM: Unpin,
impl<SM> UnwindSafe for StateMachineContainerProgram<SM>where
SM: UnwindSafe,
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