Trait eso::maybe::MaybeMap[][src]

pub trait MaybeMap<NewInner>: Maybe {
    type Out: Maybe<Inner = NewInner>;
    fn do_map<F>(self, f: F) -> Self::Out
    where
        F: FnOnce(Self::Inner) -> NewInner
; }
Expand description

A type-level function to describe the result of a Maybe::map operation

Associated Types

type Out: Maybe<Inner = NewInner>[src]

A Maybe with the inner type replaced by NewInner

Required methods

fn do_map<F>(self, f: F) -> Self::Out where
    F: FnOnce(Self::Inner) -> NewInner, 
[src]

The self is required as evidence that you are not constructing a No.

Implementors

impl<A, B> MaybeMap<B> for An<A>[src]

type Out = An<B>

fn do_map<F>(self, f: F) -> Self::Out where
    F: FnOnce(Self::Inner) -> B, 
[src]

impl<A, B> MaybeMap<B> for No<A>[src]

type Out = No<B>

fn do_map<F>(self, _: F) -> Self::Out where
    F: FnOnce(Self::Inner) -> B, 
[src]