pub struct Identity<A> {
pub value: A,
}Expand description
A simple identity monad: wraps a value with no effects.
Fields§
§value: AThe wrapped value.
Implementations§
Trait Implementations§
impl<A: Eq> Eq for Identity<A>
impl<A> StructuralPartialEq for Identity<A>
Auto Trait Implementations§
impl<A> Freeze for Identity<A>where
A: Freeze,
impl<A> RefUnwindSafe for Identity<A>where
A: RefUnwindSafe,
impl<A> Send for Identity<A>where
A: Send,
impl<A> Sync for Identity<A>where
A: Sync,
impl<A> Unpin for Identity<A>where
A: Unpin,
impl<A> UnsafeUnpin for Identity<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Identity<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