pub fn ensure(ok: bool, msg: impl FnOnce() -> String) -> Result<()>
Return Error::Config with the message of msg unless ok.
Error::Config
msg
ok
Error::Config when ok is false.