Struct simple_interner::Interned
source · pub struct Interned<'a, T: ?Sized>(_);
Expand description
An item interned by an Interner
.
As two equal interned items will always be the same reference, only the
reference is compared for equality rather than going to the potentially
expensive PartialEq
implementation on the concrete type.
In all other cases, this should act exactly as if it were a reference to the
wrapped type. To get the wrapped reference with the full lifetime, see
Interned::get
.
Implementations§
Trait Implementations§
source§impl<'a, T: Ord + ?Sized> Ord for Interned<'a, T>
impl<'a, T: Ord + ?Sized> Ord for Interned<'a, 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: ?Sized> PartialEq<Interned<'_, T>> for Interned<'_, T>
impl<T: ?Sized> PartialEq<Interned<'_, T>> for Interned<'_, T>
source§impl<'a, T: PartialOrd + ?Sized> PartialOrd<Interned<'a, T>> for Interned<'a, T>
impl<'a, T: PartialOrd + ?Sized> PartialOrd<Interned<'a, T>> for Interned<'a, T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more