pub struct StateMachine<S> { /* private fields */ }Expand description
Implementations§
Source§impl<S> StateMachine<S>
impl<S> StateMachine<S>
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns if the state machine still has states in its stack.
Sourcepub fn update(&mut self, state_data: &mut S)
pub fn update(&mut self, state_data: &mut S)
Updates the state at the top of the stack with the provided data. If the states returns a transition, perform it.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for StateMachine<S>
impl<S> !RefUnwindSafe for StateMachine<S>
impl<S> !Send for StateMachine<S>
impl<S> !Sync for StateMachine<S>
impl<S> Unpin for StateMachine<S>
impl<S> !UnwindSafe for StateMachine<S>
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