MaybeMap

Trait MaybeMap 

Source
pub trait MaybeMap<Base, Out>: Sized {
    // Required method
    fn maybe_map<R: FnOnce(Base) -> Option<Out>>(self, map: R) -> Option<Out>;
}

Required Methods§

Source

fn maybe_map<R: FnOnce(Base) -> Option<Out>>(self, map: R) -> Option<Out>

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<Base, Out> MaybeMap<Base, Out> for Option<Base>

Source§

fn maybe_map<R: FnOnce(Base) -> Option<Out>>(self, map: R) -> Option<Out>

Implementors§