Struct cl_structures::intern::interned::Interned
source · pub struct Interned<'a, T: ?Sized> { /* private fields */ }
Expand description
An Interned value is one that is referentially comparable. That is, the interned value is unique in memory, simplifying its equality and hashing implementation.
Comparing Interned values via PartialOrd or Ord will still dereference to the wrapped pointers, and as such, may produce results inconsistent with PartialEq or Eq.
Implementations§
Trait Implementations§
source§impl<T: AsRef<str>> From<T> for Interned<'static, str>
impl<T: AsRef<str>> From<T> for Interned<'static, str>
source§fn from(value: T) -> Self
fn from(value: T) -> Self
Types which implement AsRef<str>
will be stored in the global StringInterner
source§impl<'a, T: ?Sized> PartialEq for Interned<'a, T>
impl<'a, T: ?Sized> PartialEq for Interned<'a, T>
impl<'a, T: ?Sized> Copy for Interned<'a, T>
impl<'a, T: ?Sized> Eq for Interned<'a, T>
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