[][src]Struct monadic::reader::Reader

pub struct Reader<'a, E, A> {
    pub run_reader: Box<dyn Fn(E) -> A + 'a>,
}

Fields

run_reader: Box<dyn Fn(E) -> A + 'a>

Methods

impl<'a, E: 'a + Clone, A: 'static + Clone> Reader<'a, E, A>[src]

pub fn pure(x: A) -> Self[src]

pub fn initial_env(self, e: E) -> A[src]

pub fn bind<B: 'static, F: 'static>(self, f: F) -> Reader<'a, E, B> where
    F: Fn(A) -> Reader<'a, E, B>,
    B: 'static, 
[src]

pub fn local<F: 'a>(self, f: F) -> Reader<'a, E, A> where
    F: Fn(E) -> E, 
[src]

Auto Trait Implementations

impl<'a, E, A> !Send for Reader<'a, E, A>

impl<'a, E, A> !Sync for Reader<'a, E, A>

impl<'a, E, A> Unpin for Reader<'a, E, A>

impl<'a, E, A> !UnwindSafe for Reader<'a, E, A>

impl<'a, E, A> !RefUnwindSafe for Reader<'a, E, A>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]