Struct variance::Invariant
[−]
[src]
pub struct Invariant<T>(_);
A marker for forcing T to be considered invariant.
Methods
impl<T> Invariant<T>
[src]
fn new() -> Self
Create a new Invariant marker instance.
All instances of Invariant with the same T are equivalent.
Trait Implementations
impl<T> Send for Invariant<T>
[src]
impl<T> Sync for Invariant<T>
[src]
impl<T> Default for Invariant<T>
[src]
impl<T> Copy for Invariant<T>
[src]
impl<T> Clone for Invariant<T>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T> Debug for Invariant<T>
[src]
impl<T> PartialEq<Invariant<T>> for Invariant<T>
[src]
fn eq(&self, _: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, _: &Self) -> bool
This method tests for !=
.
impl<T> PartialOrd<Invariant<T>> for Invariant<T>
[src]
fn partial_cmp(&self, _: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, _: &Self) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, _: &Self) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, _: &Self) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, _: &Self) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Eq for Invariant<T>
[src]
impl<T> Ord for Invariant<T>
[src]
fn cmp(&self, _: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more