pub struct Transition<S: States> {
pub to: S,
}Expand description
A single state transition.
Represents a transition from one state to another, optionally with an associated cost.
§Example
use tinystate::Transition;
let transition = Transition::new(MyState::B);Fields§
§to: SThe destination state of this transition.
Implementations§
Trait Implementations§
Source§impl<S: Clone + States> Clone for Transition<S>
impl<S: Clone + States> Clone for Transition<S>
Source§fn clone(&self) -> Transition<S>
fn clone(&self) -> Transition<S>
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 moreSource§impl<S: Default + States> Default for Transition<S>
impl<S: Default + States> Default for Transition<S>
Source§fn default() -> Transition<S>
fn default() -> Transition<S>
Returns the “default value” for a type. Read more
impl<S: Copy + States> Copy for Transition<S>
Auto Trait Implementations§
impl<S> Freeze for Transition<S>where
S: Freeze,
impl<S> RefUnwindSafe for Transition<S>where
S: RefUnwindSafe,
impl<S> Send for Transition<S>where
S: Send,
impl<S> Sync for Transition<S>where
S: Sync,
impl<S> Unpin for Transition<S>where
S: Unpin,
impl<S> UnwindSafe for Transition<S>where
S: 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