pub struct StateMachine<T: StateMachineImpl> { /* private fields */ }
Expand description
A convenience wrapper around the StateMachine
trait that encapsulates the
state and transition and output function calls.
Implementations§
Source§impl<T> StateMachine<T>where
T: StateMachineImpl,
impl<T> StateMachine<T>where
T: StateMachineImpl,
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of this wrapper which encapsulates the initial state.
Sourcepub fn from_state(state: T::State) -> Self
pub fn from_state(state: T::State) -> Self
Create a new instance of this wrapper which encapsulates the given state.
Trait Implementations§
Source§impl<T: Clone + StateMachineImpl> Clone for StateMachine<T>
impl<T: Clone + StateMachineImpl> Clone for StateMachine<T>
Source§fn clone(&self) -> StateMachine<T>
fn clone(&self) -> StateMachine<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug + StateMachineImpl> Debug for StateMachine<T>
impl<T: Debug + StateMachineImpl> Debug for StateMachine<T>
Source§impl<T> Default for StateMachine<T>where
T: StateMachineImpl,
impl<T> Default for StateMachine<T>where
T: StateMachineImpl,
Auto Trait Implementations§
impl<T> Freeze for StateMachine<T>
impl<T> RefUnwindSafe for StateMachine<T>
impl<T> Send for StateMachine<T>
impl<T> Sync for StateMachine<T>
impl<T> Unpin for StateMachine<T>
impl<T> UnwindSafe for StateMachine<T>
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