pub enum FreeM<A> {
Pure(A),
Free(Box<FreeM<A>>),
}Expand description
Free monad: Free f a = Pure a | Free (f (Free f a)) Represents computations as data for interpretation.
Variants§
Pure(A)
Pure value in the free monad.
Free(Box<FreeM<A>>)
Suspended computation wrapped in an effect layer.
Auto Trait Implementations§
impl<A> Freeze for FreeM<A>where
A: Freeze,
impl<A> RefUnwindSafe for FreeM<A>where
A: RefUnwindSafe,
impl<A> Send for FreeM<A>where
A: Send,
impl<A> Sync for FreeM<A>where
A: Sync,
impl<A> Unpin for FreeM<A>where
A: Unpin,
impl<A> UnsafeUnpin for FreeM<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for FreeM<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more