pub struct InternedStr<H = DefaultBuildHasher, I = u32> { /* private fields */ }Expand description
A handle to an interned value in an ArenaStr.
Implementations§
Source§impl<H, I> InternedStr<H, I>
impl<H, I> InternedStr<H, I>
Sourcepub fn from_id(id: I) -> Self
Available on crate feature raw only.
pub fn from_id(id: I) -> Self
raw only.Creates an interned value for the given index.
This is a low-level function. You should instead use the
ArenaStr::intern() API to intern a value, unless you really know
what you’re doing.
Source§impl<H, I: Index> InternedStr<H, I>
impl<H, I: Index> InternedStr<H, I>
Sourcepub fn id(&self) -> I
Available on crate feature raw only.
pub fn id(&self) -> I
raw only.Obtains the underlying interning index.
This is a low-level function. You should instead use the
ArenaStr::lookup() and ArenaStr::lookup_bytes() APIs, unless you
really know what you’re doing.
Trait Implementations§
Source§impl<H, I: Index> Clone for InternedStr<H, I>
impl<H, I: Index> Clone for InternedStr<H, I>
impl<H, I: Index> Copy for InternedStr<H, I>
Source§impl<H, I: Index> Debug for InternedStr<H, I>
impl<H, I: Index> Debug for InternedStr<H, I>
Source§impl<H, I: Index> Default for InternedStr<H, I>
impl<H, I: Index> Default for InternedStr<H, I>
Source§impl<'de, H, I> Deserialize<'de> for InternedStr<H, I>where
I: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, H, I> Deserialize<'de> for InternedStr<H, I>where
I: Deserialize<'de>,
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<H, I: Index> Eq for InternedStr<H, I>
Source§impl<H, I> GetSize for InternedStr<H, I>where
I: GetSize,
Available on crate feature get-size2 only.
impl<H, I> GetSize for InternedStr<H, I>where
I: GetSize,
Available on crate feature
get-size2 only.Source§fn get_heap_size_with_tracker<Tr: GetSizeTracker>(
&self,
tracker: Tr,
) -> (usize, Tr)
fn get_heap_size_with_tracker<Tr: GetSizeTracker>( &self, tracker: Tr, ) -> (usize, Tr)
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl<H, I: Index> Hash for InternedStr<H, I>
impl<H, I: Index> Hash for InternedStr<H, I>
Source§impl<H, I: Index> Ord for InternedStr<H, I>
impl<H, I: Index> Ord for InternedStr<H, I>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<H, I: Index> PartialEq for InternedStr<H, I>
impl<H, I: Index> PartialEq for InternedStr<H, I>
Source§impl<H, I: Index> PartialOrd for InternedStr<H, I>
impl<H, I: Index> PartialOrd for InternedStr<H, I>
Auto Trait Implementations§
impl<H, I> Freeze for InternedStr<H, I>
impl<H, I> RefUnwindSafe for InternedStr<H, I>
impl<H, I> Send for InternedStr<H, I>
impl<H, I> Sync for InternedStr<H, I>
impl<H, I> Unpin for InternedStr<H, I>
impl<H, I> UnsafeUnpin for InternedStr<H, I>
impl<H, I> UnwindSafe for InternedStr<H, I>
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more