Struct statig::InitializedStatemachine
source · pub struct InitializedStatemachine<M>where
M: StateMachine,{ /* private fields */ }Expand description
A state machine that has been initialized.
Implementations
sourceimpl<M> InitializedStatemachine<M>where
M: StateMachine,
impl<M> InitializedStatemachine<M>where
M: StateMachine,
sourcepub fn state(&self) -> &<M as StateMachine>::State
pub fn state(&self) -> &<M as StateMachine>::State
Get an immutable reference to the current state of the state machine.
sourcepub unsafe fn state_mut(&mut self) -> &mut <M as StateMachine>::State
pub unsafe fn state_mut(&mut self) -> &mut <M as StateMachine>::State
Get a mutable reference the current state of the state machine.
Safety
Mutating the state externally could break the state machines internal invariants.
Trait Implementations
sourceimpl<M> Default for InitializedStatemachine<M>where
M: StateMachine,
M::Context: Default,
impl<M> Default for InitializedStatemachine<M>where
M: StateMachine,
M::Context: Default,
sourceimpl<M> Deref for InitializedStatemachine<M>where
M: StateMachine,
impl<M> Deref for InitializedStatemachine<M>where
M: StateMachine,
sourceimpl<M> DerefMut for InitializedStatemachine<M>where
M: StateMachine,
impl<M> DerefMut for InitializedStatemachine<M>where
M: StateMachine,
Auto Trait Implementations
impl<M> RefUnwindSafe for InitializedStatemachine<M>where
<M as StateMachine>::Context: RefUnwindSafe,
<M as StateMachine>::State: RefUnwindSafe,
impl<M> Send for InitializedStatemachine<M>where
<M as StateMachine>::Context: Send,
<M as StateMachine>::State: Send,
impl<M> Sync for InitializedStatemachine<M>where
<M as StateMachine>::Context: Sync,
<M as StateMachine>::State: Sync,
impl<M> Unpin for InitializedStatemachine<M>where
<M as StateMachine>::Context: Unpin,
<M as StateMachine>::State: Unpin,
impl<M> UnwindSafe for InitializedStatemachine<M>where
<M as StateMachine>::Context: UnwindSafe,
<M 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