Struct internship::Intern [] [src]

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

Interned data

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

Methods

impl<T: IntoIntern + ?Sized> Intern<T>
[src]

[src]

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

Trait Implementations

impl<'a, T: IntoIntern + ?Sized> From<&'a T> for Intern<T>
[src]

[src]

Performs the conversion.

impl From<String> for Intern<str>
[src]

[src]

Performs the conversion.

impl From<Vec<u8>> for Intern<[u8]>
[src]

[src]

Performs the conversion.

impl From<CString> for Intern<CStr>
[src]

[src]

Performs the conversion.

impl From<OsString> for Intern<OsStr>
[src]

[src]

Performs the conversion.

impl From<PathBuf> for Intern<Path>
[src]

[src]

Performs the conversion.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: IntoIntern + ?Sized> Deref for Intern<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: IntoIntern + ?Sized> Drop for Intern<T>
[src]

[src]

Executes the destructor for this type. Read more

impl<T: IntoIntern + ?Sized> PartialEq for Intern<T>
[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: IntoIntern + ?Sized> Eq for Intern<T>
[src]

impl<T: IntoIntern + ?Sized> Hash for Intern<T>
[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: IntoIntern + ?Sized> AsRef<T> for Intern<T>
[src]

[src]

Performs the conversion.

impl<T: IntoIntern + ?Sized + Binary> Binary for Intern<T>
[src]

[src]

Formats the value using the given formatter.

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

[src]

Formats the value using the given formatter. Read more

impl<T: IntoIntern + ?Sized + LowerExp> LowerExp for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: IntoIntern + ?Sized + LowerHex> LowerHex for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: IntoIntern + ?Sized + Octal> Octal for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: IntoIntern + ?Sized + UpperExp> UpperExp for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: IntoIntern + ?Sized + UpperHex> UpperHex for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: IntoIntern + ?Sized> Pointer for Intern<T>
[src]

[src]

Formats the value using the given formatter.

impl FromStr for Intern<str>
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl<'a> Add<&'a str> for Intern<str>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl ToSocketAddrs for Intern<str>
[src]

Returned iterator over socket addresses which this type may correspond to. Read more

[src]

Converts this object to an iterator of resolved SocketAddrs. Read more

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

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, T> Deserialize<'de> for Intern<T> where
    T: IntoIntern + 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<'de> Deserialize<'de> for Intern<str>
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl<'de> Deserialize<'de> for Intern<[u8]>
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

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

[src]

Formats the value using the given formatter. Read more

impl<T: PartialOrd + ?Sized> PartialOrd for Intern<T> where
    T: IntoIntern, 
[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: IntoIntern, 
[src]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

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

[src]

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

Auto Trait Implementations

impl<T> !Send for Intern<T>

impl<T> !Sync for Intern<T>