[][src]Trait mcoffin_tuple_ext::OptionExt

pub trait OptionExt<A>: Sized {
    fn and_then_tup<B, F>(self, f: F) -> Option<(A, B)>
    where
        F: FnOnce(&A) -> Option<B>
; fn and_tup<B>(self, v: Option<B>) -> Option<(A, B)> { ... } }

Required methods

fn and_then_tup<B, F>(self, f: F) -> Option<(A, B)> where
    F: FnOnce(&A) -> Option<B>, 

If both self and the result of f are Some(..), then returns Some((a, b)), otherwise returns None

Loading content...

Provided methods

fn and_tup<B>(self, v: Option<B>) -> Option<(A, B)>

If both self and v are Some(..), returns Some(a, b), otherwise returns None

Loading content...

Implementations on Foreign Types

impl<A: Sized> OptionExt<A> for Option<A>[src]

Loading content...

Implementors

Loading content...