pub trait OptionInspectNone<F>where
F: FnOnce(),{
// Required method
fn inspect_none(self, f: F) -> Self;
}Expand description
Extension trait for adding Option::inspect_none
Required Methods§
Sourcefn inspect_none(self, f: F) -> Self
fn inspect_none(self, f: F) -> Self
Call f if the Option this is called on is a None
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.