pub enum Transition {
    Next(Box<dyn Task>),
    Complete,
}
Expand description

Transition from one task to the next

When a task executes, it can control the transition to the next state in three different ways. First, it can fail by returning Err. In this case, the runtime will stop execution and handle the error gracefully. Second, a task can succeed and simply trigger the transition to the next task. Third, a task can indicate that the automaton should finish early. This can be useful if no work needs to be done.

Variants

Next(Box<dyn Task>)

Transition to the next task.

Complete

Skip all other tasks and go straight to the teardown task.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.