Expand description
A hack to control control-flow outside closures.
This crate allows one to do things like breaking loops outside a closure. It works through a a macro hack. Unless you really really need this, don’t use it.
§Example
#[macro_use]
extern crate control_flow;
loop {
let closure = || {
defer!(break)
};
// Breaks the loop.
run_loop!(closure());
}
Macros§
- defer
- Create a deferred control-flow command.
- run
- Run a deferred control-flow command (outside a loop).
- run_
loop - Run a deferred control-flow command within a loop.
Enums§
- Command
- A deferred control-flow command.