pub struct StateMachine<C> { /* private fields */ }Expand description
State machine which oversees correct codelet state transitions
Implementations§
Source§impl<C> StateMachine<C>
impl<C> StateMachine<C>
pub fn new(inner: C) -> Self
pub fn inner(&self) -> &C
pub fn inner_mut(&mut self) -> &mut C
pub fn state(&self) -> State
pub fn is_valid_request(&self, request: Transition) -> bool
pub fn transition(
&mut self,
transition: Transition,
) -> Result<DefaultStatus, TransitionError>where
C: Lifecycle,
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for StateMachine<C>where
C: Freeze,
impl<C> RefUnwindSafe for StateMachine<C>where
C: RefUnwindSafe,
impl<C> Send for StateMachine<C>where
C: Send,
impl<C> Sync for StateMachine<C>where
C: Sync,
impl<C> Unpin for StateMachine<C>where
C: Unpin,
impl<C> UnwindSafe for StateMachine<C>where
C: 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