Transition

Enum Transition 

Source
pub enum Transition<TCurr, TNext> {
    Unchanged(TCurr),
    ChangedTo(TNext),
}

Variants§

§

Unchanged(TCurr)

§

ChangedTo(TNext)

Trait Implementations§

Source§

impl<TCurr, TNext> FromResidual for Transition<TCurr, TNext>

Source§

fn from_residual(residual: <Self as Try>::Residual) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<TCurr, TNext> Try for Transition<TCurr, TNext>

Source§

type Output = TCurr

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = TNext

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual as part of ? when short-circuiting. Read more
Source§

fn from_output(output: Self::Output) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value (because this returned ControlFlow::Continue) or propagate a value back to the caller (because this returned ControlFlow::Break). Read more

Auto Trait Implementations§

§

impl<TCurr, TNext> Freeze for Transition<TCurr, TNext>
where TCurr: Freeze, TNext: Freeze,

§

impl<TCurr, TNext> RefUnwindSafe for Transition<TCurr, TNext>
where TCurr: RefUnwindSafe, TNext: RefUnwindSafe,

§

impl<TCurr, TNext> Send for Transition<TCurr, TNext>
where TCurr: Send, TNext: Send,

§

impl<TCurr, TNext> Sync for Transition<TCurr, TNext>
where TCurr: Sync, TNext: Sync,

§

impl<TCurr, TNext> Unpin for Transition<TCurr, TNext>
where TCurr: Unpin, TNext: Unpin,

§

impl<TCurr, TNext> UnwindSafe for Transition<TCurr, TNext>
where TCurr: UnwindSafe, TNext: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromEnum<T> for T

Source§

fn from_enum(t: T) -> Option<T>

Source§

impl<Enum, Variant> FromEnumMut<Enum> for Variant

Source§

impl<Enum, Variant> FromEnumRef<Enum> for Variant
where &'a Variant: for<'a> FromEnum<&'a Enum>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.