pub struct Writer<W, A> {
pub value: A,
pub log: W,
}Expand description
A Writer monad: accumulates a log alongside a value.
Fields§
§value: AThe produced value.
log: WThe accumulated log.
Implementations§
Source§impl<A> Writer<Vec<String>, A>
impl<A> Writer<Vec<String>, A>
Trait Implementations§
Auto Trait Implementations§
impl<W, A> Freeze for Writer<W, A>
impl<W, A> RefUnwindSafe for Writer<W, A>where
A: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, A> Send for Writer<W, A>
impl<W, A> Sync for Writer<W, A>
impl<W, A> Unpin for Writer<W, A>
impl<W, A> UnsafeUnpin for Writer<W, A>where
A: UnsafeUnpin,
W: UnsafeUnpin,
impl<W, A> UnwindSafe for Writer<W, A>where
A: UnwindSafe,
W: 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