Enum automatons::Transition
source · [−]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
impl !RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl !UnwindSafe for Transition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more