pub struct Invariant<T>(/* private fields */);Expand description
A marker for forcing T to be considered invariant.
Implementations§
Trait Implementations§
impl<T> Copy for Invariant<T>
impl<T> Eq for Invariant<T>
Source§impl<T> Ord for Invariant<T>
impl<T> Ord for Invariant<T>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T> PartialOrd for Invariant<T>
impl<T> PartialOrd for Invariant<T>
impl<T> Send for Invariant<T>
impl<T> Sync for Invariant<T>
Auto Trait Implementations§
impl<T> Freeze for Invariant<T>
impl<T> RefUnwindSafe for Invariant<T>
impl<T> Unpin for Invariant<T>
impl<T> UnsafeUnpin for Invariant<T>
impl<T> UnwindSafe for Invariant<T>
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