pub struct Contravariant<T: ?Sized> { /* private fields */ }
Expand description
Zero-sized type used to mark a type as contravariant with respect to its type
parameter T
.
See the module-level documentation for more.
Trait Implementations§
Source§impl<T: Clone + ?Sized> Clone for Contravariant<T>
impl<T: Clone + ?Sized> Clone for Contravariant<T>
Source§fn clone(&self) -> Contravariant<T>
fn clone(&self) -> Contravariant<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: ?Sized> Default for Contravariant<T>
impl<T: ?Sized> Default for Contravariant<T>
Source§impl<T: Ord + ?Sized> Ord for Contravariant<T>
impl<T: Ord + ?Sized> Ord for Contravariant<T>
Source§fn cmp(&self, other: &Contravariant<T>) -> Ordering
fn cmp(&self, other: &Contravariant<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + ?Sized> PartialOrd for Contravariant<T>
impl<T: PartialOrd + ?Sized> PartialOrd for Contravariant<T>
impl<T: Copy + ?Sized> Copy for Contravariant<T>
impl<T: Eq + ?Sized> Eq for Contravariant<T>
impl<T: ?Sized> StructuralPartialEq for Contravariant<T>
impl<T: ?Sized> Variance for Contravariant<T>
Auto Trait Implementations§
impl<T> Freeze for Contravariant<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Contravariant<T>where
T: ?Sized,
impl<T> Send for Contravariant<T>where
T: ?Sized,
impl<T> Sync for Contravariant<T>where
T: ?Sized,
impl<T> Unpin for Contravariant<T>where
T: ?Sized,
impl<T> UnwindSafe for Contravariant<T>where
T: ?Sized,
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