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