[−][src]Macro failure::ensure
Exits a function early with an Error
if the condition is not satisfied.
Similar to assert!
, ensure!
takes a condition and exits the function
if the condition fails. Unlike assert!
, ensure!
returns an Error
,
it does not panic.