Macro assertables::assure [−][src]
Assure a condition is true.
-
When true, return
Ok(true)
. -
When false, return
Ok(false)
. -
Otherwise, return
Err
with a message and the values of the expressions with their debug representations.
Examples
let x = assure!(true); //-> Ok(true)
let x = assure!(false); //-> Ok(false)
This macro has a second form where a custom message can be provided.