macro_rules! ensure {
    ( $x:expr, $y:expr $(,)? ) => { ... };
}
Expand description

Evaluate $x:expr and if not true return Err($y:expr).

Used as ensure!(expression_to_ensure, expression_to_return_on_false).