Skip to main content

ensure

Function ensure 

Source
pub fn ensure(ok: bool, msg: impl FnOnce() -> String) -> Result<()>
Expand description

Return Error::Config with the message of msg unless ok.

ยงErrors

Error::Config when ok is false.