Struct statig::UninitializedStateMachine
source · pub struct UninitializedStateMachine<O>where
O: StateMachine,{ /* private fields */ }Expand description
A state machine that has not yet been initialized.
A state machine needs to be initialized before it can handle events. This
can be done by calling the init method on it. This will
execute all the entry actions into the initial state.
Implementations
sourceimpl<O> UninitializedStateMachine<O>where
O: StateMachine,
impl<O> UninitializedStateMachine<O>where
O: StateMachine,
sourcepub fn init(self) -> InitializedStatemachine<O>
pub fn init(self) -> InitializedStatemachine<O>
Initialize the state machine by excecuting all entry actions towards the initial state.
let uninitialized_state_machine = Blinky::default().state_machine();
// The uninitialized state machine is consumed to create the initialized
// state machine.
let initialized_state_machine = uninitialized_state_machine.init();Auto Trait Implementations
impl<O> RefUnwindSafe for UninitializedStateMachine<O>where
<O as StateMachine>::Context: RefUnwindSafe,
<O as StateMachine>::State: RefUnwindSafe,
impl<O> Send for UninitializedStateMachine<O>where
<O as StateMachine>::Context: Send,
<O as StateMachine>::State: Send,
impl<O> Sync for UninitializedStateMachine<O>where
<O as StateMachine>::Context: Sync,
<O as StateMachine>::State: Sync,
impl<O> Unpin for UninitializedStateMachine<O>where
<O as StateMachine>::Context: Unpin,
<O as StateMachine>::State: Unpin,
impl<O> UnwindSafe for UninitializedStateMachine<O>where
<O as StateMachine>::Context: UnwindSafe,
<O as StateMachine>::State: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more