pub struct SharedDict<T> { /* private fields */ }Expand description
This struct represents the shared dictionary used for interning all the strings belonging to a v05 trace chunk.
Implementations§
Sourcepub fn get_or_insert(&mut self, s: T) -> Result<u32, TryFromIntError>
pub fn get_or_insert(&mut self, s: T) -> Result<u32, TryFromIntError>
Gets the index of the interned string. If the string is not part of the dictionary it is added and its corresponding index returned.
§Arguments:
str: string to look up in the dictionary.
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = &T>
Trait Implementations§
Source§fn clone(&self) -> SharedDict<T>
fn clone(&self) -> SharedDict<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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