pub struct StringTable { /* private fields */ }
Implementations§
Source§impl StringTable
impl StringTable
pub fn new() -> Self
pub fn hasher(&self) -> &impl BuildHasher
pub fn hash_str(&self, string: &str) -> u64
pub fn get(&self, string: &str) -> Option<StringSymbol>
pub fn get_or_intern(&mut self, string: &str) -> StringSymbol
pub fn resolve(&self, symbol: &StringSymbol) -> &str
pub fn lookup_hash(&self, symbol: &StringSymbol) -> u64
Trait Implementations§
Source§impl Clone for StringTable
impl Clone for StringTable
Source§fn clone(&self) -> StringTable
fn clone(&self) -> StringTable
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 moreSource§impl Default for StringTable
impl Default for StringTable
Source§impl<'s> Extend<&'s str> for StringTable
impl<'s> Extend<&'s str> for StringTable
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = &'s str>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = &'s str>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl Freeze for StringTable
impl RefUnwindSafe for StringTable
impl Send for StringTable
impl Sync for StringTable
impl Unpin for StringTable
impl UnwindSafe for StringTable
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