[][src]Trait fool::BoolExt

pub trait BoolExt: Sized {
    fn into_option(self) -> Option<()>;
fn into_result(self) -> Result<(), ()>; fn and<T>(self, option: Option<T>) -> Option<T> { ... }
fn and_then<T, F>(self, f: F) -> Option<T>
    where
        F: FnOnce() -> Option<T>
, { ... }
fn then<T, F>(self, f: F) -> Option<T>
    where
        F: FnOnce() -> T
, { ... }
fn then_ext<T, F>(self, f: F) -> Option<T>
    where
        F: FnOnce() -> T
, { ... }
fn then_some<T>(self, value: T) -> Option<T> { ... }
fn then_some_ext<T>(self, value: T) -> Option<T> { ... }
fn ok_or<E>(self, error: E) -> Result<(), E> { ... }
fn ok_or_else<E, F>(self, f: F) -> Result<(), E>
    where
        F: FnOnce() -> E
, { ... } }

Required methods

fn into_option(self) -> Option<()>

fn into_result(self) -> Result<(), ()>

Loading content...

Provided methods

fn and<T>(self, option: Option<T>) -> Option<T>

fn and_then<T, F>(self, f: F) -> Option<T> where
    F: FnOnce() -> Option<T>, 

fn then<T, F>(self, f: F) -> Option<T> where
    F: FnOnce() -> T, 

fn then_ext<T, F>(self, f: F) -> Option<T> where
    F: FnOnce() -> T, 

fn then_some<T>(self, value: T) -> Option<T>

fn then_some_ext<T>(self, value: T) -> Option<T>

fn ok_or<E>(self, error: E) -> Result<(), E>

fn ok_or_else<E, F>(self, f: F) -> Result<(), E> where
    F: FnOnce() -> E, 

Loading content...

Implementors

impl BoolExt for bool[src]

Loading content...