[−][src]Struct variance::Invariant
A marker for forcing T to be considered invariant.
Methods
impl<T> Invariant<T>[src]
pub fn new() -> Self[src]
Create a new Invariant marker instance.
All instances of Invariant with the same T are equivalent.
Trait Implementations
impl<T> Sync for Invariant<T>[src]
impl<T> PartialEq<Invariant<T>> for Invariant<T>[src]
impl<T> Clone for Invariant<T>[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T> Ord for Invariant<T>[src]
fn cmp(&self, _: &Self) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self[src]
🔬 This is a nightly-only experimental API. (
clamp)Restrict a value to a certain interval. Read more
impl<T> Eq for Invariant<T>[src]
impl<T> Send for Invariant<T>[src]
impl<T> PartialOrd<Invariant<T>> for Invariant<T>[src]
fn partial_cmp(&self, _: &Self) -> Option<Ordering>[src]
fn lt(&self, _: &Self) -> bool[src]
fn le(&self, _: &Self) -> bool[src]
fn gt(&self, _: &Self) -> bool[src]
fn ge(&self, _: &Self) -> bool[src]
impl<T> Copy for Invariant<T>[src]
impl<T> Default for Invariant<T>[src]
impl<T> Debug for Invariant<T>[src]
impl<T> Hash for Invariant<T>[src]
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,