BoolToOption

Trait BoolToOption 

Source
pub trait BoolToOption: Sized {
    // Provided methods
    fn bool_to_option<F>(self, f: F) -> Option<Self>
       where F: Fn(&Self) -> bool { ... }
    fn bool_to_option_else<F, N>(self, f: F, other: N) -> Option<N>
       where F: Fn(Self) -> bool { ... }
}

Provided Methods§

Source

fn bool_to_option<F>(self, f: F) -> Option<Self>
where F: Fn(&Self) -> bool,

Source

fn bool_to_option_else<F, N>(self, f: F, other: N) -> Option<N>
where F: Fn(Self) -> bool,

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.

Implementors§

Source§

impl<T> BoolToOption for T