Macro elfo_utils::ward
source · macro_rules! ward { ($o:expr) => { ... }; ($o:expr, else $body:block) => { ... }; ($o:expr, $early:stmt) => { ... }; }
Expand description
Returns the contents of a Option<T>
’s Some(T)
, otherwise it returns
early from the function. Can alternatively have an else
branch, or an
alternative “early return” statement, like break
or continue
for loops.