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]
pub fn new(value: &T) -> Self[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]
impl From<String> for Intern<str>[src]
impl From<Vec<u8>> for Intern<[u8]>[src]
impl From<CString> for Intern<CStr>[src]
impl From<OsString> for Intern<OsStr>[src]
impl From<PathBuf> for Intern<Path>[src]
impl<T: IntoIntern + ?Sized> Clone for Intern<T>[src]
fn clone(&self) -> Self[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: IntoIntern + ?Sized> Deref for Intern<T>[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T[src]
Dereferences the value.
impl<T: IntoIntern + ?Sized> Drop for Intern<T>[src]
impl<T: IntoIntern + ?Sized> PartialEq for Intern<T>[src]
fn eq(&self, other: &Self) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.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]
fn hash<H: Hasher>(&self, hasher: &mut H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl<T: IntoIntern + ?Sized> AsRef<T> for Intern<T>[src]
impl<T: IntoIntern + ?Sized + Binary> Binary for Intern<T>[src]
impl<T: IntoIntern + ?Sized + Display> Display for Intern<T>[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T: IntoIntern + ?Sized + LowerExp> LowerExp for Intern<T>[src]
impl<T: IntoIntern + ?Sized + LowerHex> LowerHex for Intern<T>[src]
impl<T: IntoIntern + ?Sized + Octal> Octal for Intern<T>[src]
impl<T: IntoIntern + ?Sized + UpperExp> UpperExp for Intern<T>[src]
impl<T: IntoIntern + ?Sized + UpperHex> UpperHex for Intern<T>[src]
impl<T: IntoIntern + ?Sized> Pointer for Intern<T>[src]
impl FromStr for Intern<str>[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ParseError>[src]
Parses a string s to return a value of this type. Read more
impl<'a> Add<&'a str> for Intern<str>[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: &'a str) -> Self[src]
Performs the + operation.
impl ToSocketAddrs for Intern<str>[src]
type Iter = <str as ToSocketAddrs>::Iter
Returned iterator over socket addresses which this type may correspond to. Read more
fn to_socket_addrs(&self) -> Result<Self::Iter>[src]
Converts this object to an iterator of resolved SocketAddrs. Read more
impl<T: ?Sized> Serialize for Intern<T> where
T: IntoIntern + Serialize, [src]
T: IntoIntern + Serialize,
fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>[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]
T: IntoIntern + ToOwned,
&'a T: Into<Rc<T>>,
<T as ToOwned>::Owned: Deserialize<'de> + Into<Rc<T>> + Hash + Eq,
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>[src]
Deserialize this value from the given Serde deserializer. Read more
impl<'de> Deserialize<'de> for Intern<str>[src]
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>[src]
Deserialize this value from the given Serde deserializer. Read more
impl<'de> Deserialize<'de> for Intern<[u8]>[src]
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>[src]
Deserialize this value from the given Serde deserializer. Read more
impl<T: Debug + ?Sized> Debug for Intern<T> where
T: IntoIntern, [src]
T: IntoIntern,
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T: PartialOrd + ?Sized> PartialOrd for Intern<T> where
T: IntoIntern, [src]
T: IntoIntern,
fn partial_cmp(&self, __arg_0: &Intern<T>) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &Intern<T>) -> bool[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &Intern<T>) -> bool[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &Intern<T>) -> bool[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &Intern<T>) -> bool[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]
T: IntoIntern,
fn cmp(&self, __arg_0: &Intern<T>) -> Ordering[src]
This method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.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]
T: IntoIntern,