pub struct StateMachine<UserStateMachine: TopState> { /* private fields */ }
Expand description
Represent a fully functional state machine, which already transitioned to its
first state. It may be only created from a call to InitStateMachine::init()
.
Implementations§
Source§impl<UserStateMachine: TopState> StateMachine<UserStateMachine>
impl<UserStateMachine: TopState> StateMachine<UserStateMachine>
Sourcepub fn dispatch(&mut self, user_evt: &<UserStateMachine as TopState>::Evt)
pub fn dispatch(&mut self, user_evt: &<UserStateMachine as TopState>::Evt)
Dispatch an event to the state machine. The event is of the type you have set
in TopState::Evt
.
Auto Trait Implementations§
impl<UserStateMachine> Freeze for StateMachine<UserStateMachine>where
UserStateMachine: Freeze,
impl<UserStateMachine> RefUnwindSafe for StateMachine<UserStateMachine>where
UserStateMachine: RefUnwindSafe,
impl<UserStateMachine> Send for StateMachine<UserStateMachine>where
UserStateMachine: Send,
impl<UserStateMachine> Sync for StateMachine<UserStateMachine>where
UserStateMachine: Sync,
impl<UserStateMachine> Unpin for StateMachine<UserStateMachine>where
UserStateMachine: Unpin,
impl<UserStateMachine> UnwindSafe for StateMachine<UserStateMachine>where
UserStateMachine: 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