pub trait OptionExt {
type Value;
// Required methods
fn ok_or_err(self, name: impl Into<String>) -> Result<Self::Value, Global>;
fn ok_or_err_else<N, F>(
self,
name_factory: F
) -> Result<Self::Value, Global>
where N: Into<String>,
F: FnOnce() -> N;
}
Expand description
A helper trait to map None
conditions to tea Error
s
Required Associated Types§
type Value
Required Methods§
Object Safety§
This trait is not object safe.