pub struct Interned<'a, T>(pub &'a T, _)
where
T: ?Sized;Expand description
Due to [Prv], clients cannot make this type directly, but still allowed to use pattern
match.
Tuple Fields§
§0: &'a TImplementations§
Source§impl<'a, T> Interned<'a, T>where
T: ?Sized,
impl<'a, T> Interned<'a, T>where
T: ?Sized,
pub fn raw(&self) -> RawInterned<T>
pub fn erased_raw(&self) -> RawInterned
Source§impl<'a, T> Interned<'a, T>where
T: ?Sized,
impl<'a, T> Interned<'a, T>where
T: ?Sized,
Sourcepub unsafe fn from_raw(raw: RawInterned<T>) -> Interned<'a, T>
pub unsafe fn from_raw(raw: RawInterned<T>) -> Interned<'a, T>
§Safety
Value pointed by the given raw must be alive in an interner.
Source§impl<'a, T> Interned<'a, T>
impl<'a, T> Interned<'a, T>
Sourcepub unsafe fn from_erased_raw(raw: RawInterned) -> Interned<'a, T>
pub unsafe fn from_erased_raw(raw: RawInterned) -> Interned<'a, T>
§Safety
- Value pointed by the given
rawmust be alive in an interner. - Type must be correct.
Trait Implementations§
Source§impl<T> Ord for Interned<'_, T>
impl<T> Ord for Interned<'_, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq for Interned<'_, T>where
T: ?Sized,
Compares data addresses only, which is sufficient for interned values.
impl<T> PartialEq for Interned<'_, T>where
T: ?Sized,
Compares data addresses only, which is sufficient for interned values.
Source§impl<T> PartialOrd for Interned<'_, T>where
T: PartialOrd + ?Sized,
impl<T> PartialOrd for Interned<'_, T>where
T: PartialOrd + ?Sized,
impl<T> Copy for Interned<'_, T>where
T: ?Sized,
impl<T> Eq for Interned<'_, T>where
T: ?Sized,
Compares data addresses only, which is sufficient for interned values.
Auto Trait Implementations§
impl<'a, T> Freeze for Interned<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for Interned<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> Send for Interned<'a, T>
impl<'a, T> Sync for Interned<'a, T>
impl<'a, T> Unpin for Interned<'a, T>where
T: ?Sized,
impl<'a, T> UnwindSafe for Interned<'a, T>where
T: RefUnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.