Trait fool::BoolExt

source ·
pub trait BoolExt: Sized {
    fn option(self) -> Option<()>;
    fn some<T>(self, value: T) -> Option<T>;
    fn some_with<T, F>(self, f: F) -> Option<T>
    where
        F: Fn() -> T
; fn ok_or<T, E>(self, value: T, error: E) -> Result<T, E>; fn ok_or_else<F, G, T, E>(self, f: F, g: G) -> Result<T, E>
    where
        F: Fn() -> T,
        G: Fn() -> E
; }

Required Methods

Implementations on Foreign Types

Implementors