Struct intern_arc::InternedOrd [−][src]
An interned value
This type works very similar to an Arc
with the difference that it has no concept of weak references. They are not needed because
interned values must not be modified, so reference cycles cannot be constructed. One
reference is held by the interner that created this value as long as that interner lives.
Keeping interned values around does not keep the interner alive: once the last reference to the interner is dropped, it will release its existing references to interned values by dropping its set implementation. Only the direct allocation size of the set implementation remains allocated (but no longer functional) until the last weak reference to the interner goes away — each interned value keeps one such weak reference to its interner.
Implementations
impl<T: ?Sized + Ord> InternedOrd<T>
[src]
pub fn ref_count(&self) -> u32
[src]
Obtain current number of references, including this one.
The value will always be at least 1. If the value is 1, this means that the interner which produced this reference has been dropped; in this case you are still free to use this reference in any way you like.
Trait Implementations
impl<T: ?Sized + Ord> AsRef<T> for InternedOrd<T>
[src]
impl<T: ?Sized + Ord> Borrow<T> for InternedOrd<T>
[src]
impl<T: ?Sized + Ord> Clone for InternedOrd<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: ?Sized + Ord> Debug for InternedOrd<T> where
T: Debug,
[src]
T: Debug,
impl<T: ?Sized + Ord> Deref for InternedOrd<T>
[src]
impl<T: ?Sized + Ord> Display for InternedOrd<T> where
T: Display,
[src]
T: Display,
impl<T: ?Sized + Ord> Eq for InternedOrd<T> where
T: Eq,
[src]
T: Eq,
impl<T: ?Sized + Ord> Hash for InternedOrd<T> where
T: Hash,
[src]
T: Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: ?Sized + Ord> Ord for InternedOrd<T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T: ?Sized + Ord> PartialEq<InternedOrd<T>> for InternedOrd<T> where
T: PartialEq,
[src]
T: PartialEq,
impl<T: ?Sized + Ord> PartialOrd<InternedOrd<T>> for InternedOrd<T> where
T: PartialOrd,
[src]
T: PartialOrd,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: ?Sized + Ord> Pointer for InternedOrd<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for InternedOrd<T>
impl<T: ?Sized> Send for InternedOrd<T> where
T: Send + Sync,
T: Send + Sync,
impl<T: ?Sized> Sync for InternedOrd<T> where
T: Send + Sync,
T: Send + Sync,
impl<T: ?Sized> Unpin for InternedOrd<T>
impl<T> !UnwindSafe for InternedOrd<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,