Enum krator::state::Transition[][src]

pub enum Transition<S: ResourceState> {
    Next(StateHolder<S>),
    Complete(Result<()>),
}

Represents result of state execution and which state to transition to next.

Variants

Next(StateHolder<S>)

Transition to new state.

Complete(Result<()>)

Stop executing the state machine and report the result of the execution.

Implementations

impl<S: ResourceState> Transition<S>[src]

pub fn next<I: State<S>, O: State<S>>(_i: Box<I>, o: O) -> Transition<S> where
    I: TransitionTo<O>, 
[src]

Construct Transition::Next from old state and new state. Both states must be State with matching PodState. Input state must implement TransitionTo, which can be done manually or with the TransitionTo derive macro (requires the derive feature to be enabled)

pub fn next_unchecked<I: State<S>, O: State<S>>(
    _i: Box<I>,
    o: O
) -> Transition<S>
[src]

Represents a transition to a new state that is not checked against the set of permissible transitions. This is intended only for use by generic states which cannot declare an exit transition to an associated state without encountering a "conflicting implementations" compiler error.

Auto Trait Implementations

impl<S> !RefUnwindSafe for Transition<S>[src]

impl<S> Send for Transition<S>[src]

impl<S> Sync for Transition<S>[src]

impl<S> Unpin for Transition<S>[src]

impl<S> !UnwindSafe for Transition<S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.