pub enum ConsoleProg<A> {
Done(A),
Step(ConsoleEffect, Box<dyn FnOnce(String) -> ConsoleProg<A>>),
}Expand description
A free monad over ConsoleEffect for console programs.
Variants§
Done(A)
Pure result.
Step(ConsoleEffect, Box<dyn FnOnce(String) -> ConsoleProg<A>>)
Perform an effect and continue.
Auto Trait Implementations§
impl<A> Freeze for ConsoleProg<A>where
A: Freeze,
impl<A> !RefUnwindSafe for ConsoleProg<A>
impl<A> !Send for ConsoleProg<A>
impl<A> !Sync for ConsoleProg<A>
impl<A> Unpin for ConsoleProg<A>where
A: Unpin,
impl<A> UnsafeUnpin for ConsoleProg<A>where
A: UnsafeUnpin,
impl<A> !UnwindSafe for ConsoleProg<A>
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