pub trait OptionExt<T> {
// Required method
fn ok_or_err_msg(self, msg: &'static str) -> Result<T, Error>;
}Expand description
An extension to Option to allow turning None case to an Error from a
static string (handy for WASM).
pub trait OptionExt<T> {
// Required method
fn ok_or_err_msg(self, msg: &'static str) -> Result<T, Error>;
}An extension to Option to allow turning None case to an Error from a
static string (handy for WASM).