Crate loop_unwrap

Source
Expand description

§loop_unwrap

Provides utility macros for unwrapping during loops.

Macros§

unwrap_break
Works like .unwrap, if it’s an Err or None, it calls break on the loop. Prints an error message with println!() if provided. Loop Label can be provided in any order besides the Result/Option being the first argument. If loop label is proivded, the specified loop will be break;-ed.
unwrap_break_err
Works only on Result enum. If the value is Err(e), breaks the loop returning Err(e). Otherwise, it unwraps and the code continues. Supports loop labels.
unwrap_continue
Works like .unwrap, if it’s an Err or None, it calls continue on the loop. Prints an error message with println!() if provided. Loop Label can be provided in any order besides the Result/Option being the first argument. If loop label is proivded, the specified loop will be continued.

Traits§

ToOption