pub struct Transition<S, E> { /* private fields */ }Expand description
A directed transition in a finite state machine.
S is the state type and E is the event type. In normal use both are
small enum-like values that implement Copy, Eq, and Hash.
Implementations§
Source§impl<S, E> Transition<S, E>
impl<S, E> Transition<S, E>
Sourcepub const fn source(&self) -> S
pub const fn source(&self) -> S
Returns the source state of this transition.
§Returns
The state that must be current before this transition can be applied.
Trait Implementations§
Source§impl<S: Clone, E: Clone> Clone for Transition<S, E>
impl<S: Clone, E: Clone> Clone for Transition<S, E>
Source§fn clone(&self) -> Transition<S, E>
fn clone(&self) -> Transition<S, E>
Returns a duplicate 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 moreimpl<S: Copy, E: Copy> Copy for Transition<S, E>
impl<S: Eq, E: Eq> Eq for Transition<S, E>
impl<S, E> StructuralPartialEq for Transition<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for Transition<S, E>
impl<S, E> RefUnwindSafe for Transition<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for Transition<S, E>
impl<S, E> Sync for Transition<S, E>
impl<S, E> Unpin for Transition<S, E>
impl<S, E> UnsafeUnpin for Transition<S, E>where
S: UnsafeUnpin,
E: UnsafeUnpin,
impl<S, E> UnwindSafe for Transition<S, E>where
S: UnwindSafe,
E: 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