pub trait OptionExt: Option {
// Required method
fn or_warn_with<E: Error>(self, error: E, warn: &mut impl Warn<E>) -> Self;
}
Expand description
Required Methods§
Sourcefn or_warn_with<E: Error>(self, error: E, warn: &mut impl Warn<E>) -> Self
fn or_warn_with<E: Error>(self, error: E, warn: &mut impl Warn<E>) -> Self
Yield error error
into sink warn
if the option contains None
. The option
is returned unchanged.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.