pub struct Invariant<T: ?Sized> { /* private fields */ }
Expand description
Zero-sized type used to mark a type as invariant with respect to its type
parameter T
.
See the module-level documentation for more.
Trait Implementations§
Source§impl<T: Ord + ?Sized> Ord for Invariant<T>
impl<T: Ord + ?Sized> Ord for Invariant<T>
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 Invariant<T>
impl<T: PartialOrd + ?Sized> PartialOrd for Invariant<T>
impl<T: Copy + ?Sized> Copy for Invariant<T>
impl<T: Eq + ?Sized> Eq for Invariant<T>
impl<T: ?Sized> StructuralPartialEq for Invariant<T>
impl<T: ?Sized> Variance for Invariant<T>
Auto Trait Implementations§
impl<T> Freeze for Invariant<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Invariant<T>where
T: ?Sized,
impl<T> Send for Invariant<T>where
T: ?Sized,
impl<T> Sync for Invariant<T>where
T: ?Sized,
impl<T> Unpin for Invariant<T>where
T: ?Sized,
impl<T> UnwindSafe for Invariant<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