ensure

Macro ensure 

Source
pub macro ensure {
    ($cond:expr, $msg:literal $(,)?) => { ... },
    ($cond:expr, $fmt:literal, $($arg:expr),* $(,)?) => { ... },
}
Expand description

A macro that returns an error if a condition is false