Struct variance::Invariant [] [src]

pub struct Invariant<T>(_);

A marker for forcing T to be considered invariant.

Methods

impl<T> Invariant<T>

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>

impl<T> Sync for Invariant<T>

impl<T> Default for Invariant<T>

fn default() -> Self

impl<T> Copy for Invariant<T>

impl<T> Clone for Invariant<T>

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)1.0.0

impl<T> Debug for Invariant<T>

fn fmt(&self, f: &mut Formatter) -> Result

impl<T> PartialEq<Invariant<T>> for Invariant<T>

fn eq(&self, _: &Self) -> bool

fn ne(&self, _: &Self) -> bool

impl<T> PartialOrd<Invariant<T>> for Invariant<T>

fn partial_cmp(&self, _: &Self) -> Option<Ordering>

fn lt(&self, _: &Self) -> bool

fn le(&self, _: &Self) -> bool

fn gt(&self, _: &Self) -> bool

fn ge(&self, _: &Self) -> bool

impl<T> Eq for Invariant<T>

impl<T> Ord for Invariant<T>

fn cmp(&self, _: &Self) -> Ordering

impl<T> Hash for Invariant<T>

fn hash<H: Hasher>(&self, state: &mut H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0