Enum control_flow::Command [] [src]

#[must_use = "Without using the `Command` it doesn\'t do anything. You should execute it through `run!()` or `run_loop!()`."]
pub enum Command<R, T> { Give(T), Return(R), Break, Continue, }

A deferred control-flow command.

Variants

Pass the value on.

This is not the same as return. What it does is that instead of breaking the control flow, it passes on the value. That is, when run!() is called on this variant, the value that it holds is evaluated to.

Return the value.

This (when eventually executed) returns the given value.

Break a loop.

This (when eventually executed) breaks the loop.

Continue a loop.

This (when eventually executed) continues the loop to next iteration.