pub trait OptionExt {
type Value;
fn ok_or_err<S>(
self,
name: impl Into<String>
) -> Result<Self::Value, Error<S>>
where
S: Scope;
fn ok_or_err_else<S, N, F>(
self,
name_factory: F
) -> Result<Self::Value, Error<S>>
where
S: Scope,
N: Into<String>,
F: FnOnce() -> N;
}
Expand description
A helper trait to map None
conditions to tea Error
s