[][src]Struct monadic::reader_trans::ReaderT

pub struct ReaderT<'a, E, M> {
    pub run_reader_t: Box<dyn Fn(E) -> M + 'a>,
}

Fields

run_reader_t: Box<dyn Fn(E) -> M + 'a>

Methods

impl<'a, A, E, M> ReaderT<'a, E, M> where
    E: 'a + Clone,
    A: 'a + Clone,
    M: 'a + Clone + Monad<Item = A> + FromIterator<A>, 
[src]

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

This function requires to type annotate the inner monad, better use lift( MonadInstance::pure)

pub fn bind<B, N, F>(self, f: F) -> ReaderT<'a, E, N> where
    F: 'a + Fn(A) -> ReaderT<'a, E, N>,
    B: 'a,
    N: 'a + Monad<Item = B> + FromIterator<B>, 
[src]

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

pub fn lift(m: M) -> ReaderT<'a, E, M>[src]

lift a monad

pub fn lift_iter<I>(it: I) -> ReaderT<'a, E, M> where
    I: 'a + Iterator<Item = A> + Clone
[src]

lift from iterator

Auto Trait Implementations

impl<'a, E, M> !RefUnwindSafe for ReaderT<'a, E, M>

impl<'a, E, M> !Send for ReaderT<'a, E, M>

impl<'a, E, M> !Sync for ReaderT<'a, E, M>

impl<'a, E, M> Unpin for ReaderT<'a, E, M>

impl<'a, E, M> !UnwindSafe for ReaderT<'a, E, M>

Blanket Implementations

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

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

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

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 = Infallible

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.