[−][src]Struct monadic::reader_trans::ReaderT
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]
E: 'a + Clone,
A: 'a + Clone,
M: 'a + Clone + Monad<Item = A> + FromIterator<A>,
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]
F: 'a + Fn(A) -> ReaderT<'a, E, N>,
B: 'a,
N: 'a + Monad<Item = B> + FromIterator<B>,
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]
I: 'a + Iterator<Item = A> + Clone,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,