pub struct StateMachine<S, P1 = (), P2 = (), P3 = (), P4 = (), P5 = (), P6 = (), P7 = (), P8 = ()>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S>,{ /* private fields */ }Implementations§
Source§impl<S, P1, P2, P3, P4, P5, P6, P7, P8> StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S>,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S>,
pub fn new_context<S2>( state: S2, context: S::Context, ) -> StateMachine<S::States, P1, P2, P3, P4, P5, P6, P7, P8>
pub fn new<S2>(state: S2) -> Selfwhere
S2: StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S> + Into<S::States>,
S::Context: Default,
pub fn run(&mut self)
pub fn update(&mut self)
pub fn transition(&mut self, new_state: impl Into<S>)
pub fn context(&self) -> &S::Context
pub fn context_mut(&mut self) -> &mut S::Context
pub fn state(&self) -> &S::States
pub fn state_mut(&mut self) -> &mut S::States
Trait Implementations§
Source§impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Debug for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Debug for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>
Source§impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Drop for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S>,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Drop for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S>,
Source§impl<S, P1, P2, P3, P4, P5, P6, P7, P8> HasEndState for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S> + HasEndState,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> HasEndState for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
S: State<P1, P2, P3, P4, P5, P6, P7, P8> + Machine<P1, P2, P3, P4, P5, P6, P7, P8> + StateTypes<P1, P2, P3, P4, P5, P6, P7, P8, States = S> + HasEndState,
fn is_finished(&self) -> bool
Auto Trait Implementations§
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Freeze for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: Freeze,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: Freeze,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: Freeze,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> RefUnwindSafe for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: RefUnwindSafe,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: RefUnwindSafe,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: RefUnwindSafe,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Send for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: Send,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: Send,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: Send,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Sync for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: Sync,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: Sync,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: Sync,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> Unpin for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: Unpin,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: Unpin,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: Unpin,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> UnsafeUnpin for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: UnsafeUnpin,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: UnsafeUnpin,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: UnsafeUnpin,
impl<S, P1, P2, P3, P4, P5, P6, P7, P8> UnwindSafe for StateMachine<S, P1, P2, P3, P4, P5, P6, P7, P8>where
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::States: UnwindSafe,
<S as StateTypes<P1, P2, P3, P4, P5, P6, P7, P8>>::Context: UnwindSafe,
PhantomData<(P1, P2, P3, P4, P5, P6, P7, P8)>: 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
Source§impl<T, GFT> TupleSelect<T, GFT> for T
impl<T, GFT> TupleSelect<T, GFT> for T
Source§fn select<J>(&self) -> &Jwhere
J: SelectFromTuple<T, GFT>,
fn select<J>(&self) -> &Jwhere
J: SelectFromTuple<T, GFT>,
Gets a reference to a tuple element defined by its type.
Your code will not compile if the tuple doesn’t have exactly 1 element of the chosen type.
Your code will not compile if the tuple doesn’t have exactly 1 element of the chosen type.
Source§impl<T, GFT> TupleSelectMut<T, GFT> for T
impl<T, GFT> TupleSelectMut<T, GFT> for T
Source§fn select_mut<J>(&mut self) -> &mut Jwhere
J: SelectFromTupleMut<T, GFT>,
fn select_mut<J>(&mut self) -> &mut Jwhere
J: SelectFromTupleMut<T, GFT>,
Gets a mutable reference to a tuple element defined by its type.
Your code will not compile if the tuple doesn’t have exactly 1 element of the chosen type.
Your code will not compile if the tuple doesn’t have exactly 1 element of the chosen type.