Struct internship::Intern [] [src]

pub struct Intern<T: ?Sized>(_)
where
    T: AllowIntern
;

Interned data

Intern<T> is conceptually same as Rc<T> but unique over its value within thread.

Methods

impl<T: ?Sized> Intern<T> where
    T: AllowIntern,
    &'a T: Into<Rc<T>>, 
[src]

[src]

Create new Intern<T> from given value if matching cache not found.

Trait Implementations

impl<T: ?Sized> Serialize for Intern<T> where
    T: AllowIntern + Serialize
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, T> Deserialize<'de> for Intern<T> where
    T: AllowIntern + ToOwned,
    &'a T: Into<Rc<T>>,
    <T as ToOwned>::Owned: Deserialize<'de> + Into<Rc<T>> + Hash + Eq
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl<T: Debug + ?Sized> Debug for Intern<T> where
    T: AllowIntern
[src]

[src]

Formats the value using the given formatter.

impl<T: Clone + ?Sized> Clone for Intern<T> where
    T: AllowIntern
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Eq + ?Sized> Eq for Intern<T> where
    T: AllowIntern
[src]

impl<T: PartialOrd + ?Sized> PartialOrd for Intern<T> where
    T: AllowIntern
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

impl<T: Ord + ?Sized> Ord for Intern<T> where
    T: AllowIntern
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl<T: Default + ?Sized> Default for Intern<T> where
    T: AllowIntern
[src]

[src]

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

impl<'a, T: ?Sized> From<&'a T> for Intern<T> where
    T: AllowIntern,
    &'aa T: Into<Rc<T>>, 
[src]

[src]

Performs the conversion.

impl<T: ?Sized> Deref for Intern<T> where
    T: AllowIntern
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: ?Sized> Drop for Intern<T> where
    T: AllowIntern
[src]

[src]

Executes the destructor for this type. Read more

impl<T: ?Sized> PartialEq<Self> for Intern<T> where
    T: AllowIntern
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl<T: ?Sized> Hash for Intern<T> where
    T: AllowIntern
[src]

[src]

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

1.3.0
[src]

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

impl<T: ?Sized> AsRef<T> for Intern<T> where
    T: AllowIntern
[src]

[src]

Performs the conversion.

impl<T: ?Sized> Display for Intern<T> where
    T: AllowIntern + Display
[src]

[src]

Formats the value using the given formatter. Read more