pub struct Interned<'a, T: ?Sized>(pub &'a T, _);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: ?Sized> Interned<'a, T>
impl<'a, T: ?Sized> Interned<'a, T>
pub fn raw(&self) -> RawInterned<T>
pub fn erased_raw(&self) -> RawInterned
Source§impl<'a, T: ?Sized> Interned<'a, T>
impl<'a, T: ?Sized> Interned<'a, T>
Sourcepub unsafe fn from_raw(raw: RawInterned<T>) -> Self
pub unsafe fn from_raw(raw: RawInterned<T>) -> Self
§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) -> Self
pub unsafe fn from_erased_raw(raw: RawInterned) -> Self
§Safety
- Value pointed by the given
rawmust be alive in an interner. - Type must be correct.
Trait Implementations§
Source§impl<T: Ord + ?Sized> Ord for Interned<'_, T>
impl<T: Ord + ?Sized> Ord for Interned<'_, T>
Source§impl<T: ?Sized> PartialEq for Interned<'_, T>
Compares data addresses only, which is sufficient for interned values.
impl<T: ?Sized> PartialEq for Interned<'_, T>
Compares data addresses only, which is sufficient for interned values.
Source§impl<T: PartialOrd + ?Sized> PartialOrd for Interned<'_, T>
impl<T: PartialOrd + ?Sized> PartialOrd for Interned<'_, T>
impl<T: ?Sized> Copy for Interned<'_, T>
impl<T: ?Sized> Eq for Interned<'_, T>
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.