Enum krator::state::Transition [−][src]
Represents result of state execution and which state to transition to next.
Variants
Next(StateHolder<S>)
Transition to new state.
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]
I: TransitionTo<O>,
Construct Transition::Next from old state and new state. Both states must be StateTransitionTo
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]
_i: Box<I>,
o: O
) -> Transition<S>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,