Struct variance::Invariant [] [src]

pub struct Invariant<T>(_);

A marker for forcing T to be considered invariant.

Methods

impl<T> Invariant<T>
[src]

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]

Returns the "default value" for a type. Read more

impl<T> Copy for Invariant<T>
[src]

impl<T> Clone for Invariant<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Debug for Invariant<T>
[src]

Formats the value using the given formatter.

impl<T> PartialEq<Invariant<T>> for Invariant<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T> PartialOrd<Invariant<T>> for Invariant<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

impl<T> Hash for Invariant<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more