Struct frunk_laws::wrapper::Wrapper
source · pub struct Wrapper<A>(_);
Expand description
The Wrapper NewType. Used for writing implementations of traits that we don’t own for type we don’t own.
Avoids the orphan typeclass instances problem in Haskell.
Trait Implementations
sourceimpl<A: PartialEq> PartialEq<Wrapper<A>> for Wrapper<A>
impl<A: PartialEq> PartialEq<Wrapper<A>> for Wrapper<A>
sourceimpl<A: PartialOrd> PartialOrd<Wrapper<A>> for Wrapper<A>
impl<A: PartialOrd> PartialOrd<Wrapper<A>> for Wrapper<A>
sourcefn partial_cmp(&self, other: &Wrapper<A>) -> Option<Ordering>
fn partial_cmp(&self, other: &Wrapper<A>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<A: Eq> Eq for Wrapper<A>
impl<A> StructuralEq for Wrapper<A>
impl<A> StructuralPartialEq for Wrapper<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for Wrapper<A>where
A: RefUnwindSafe,
impl<A> Send for Wrapper<A>where
A: Send,
impl<A> Sync for Wrapper<A>where
A: Sync,
impl<A> Unpin for Wrapper<A>where
A: Unpin,
impl<A> UnwindSafe for Wrapper<A>where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U, I> LiftInto<U, I> for Twhere
U: LiftFrom<T, I>,
impl<T, U, I> LiftInto<U, I> for Twhere
U: LiftFrom<T, I>,
fn lift_into(self) -> U
fn lift_into(self) -> U
Performs the indexed conversion.