OptionInspectNone

Trait OptionInspectNone 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl<F, T> OptionInspectNone<F> for Option<T>
where F: FnOnce(),

Source§

fn inspect_none(self, f: F) -> Self

Implementors§