pub struct StringTable { /* private fields */ }Implementations
sourceimpl 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
sourceimpl Clone for StringTable
impl Clone for StringTable
sourcefn clone(&self) -> StringTable
fn clone(&self) -> StringTable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Default for StringTable
impl Default for StringTable
sourcefn default() -> StringTable
fn default() -> StringTable
Returns the “default value” for a type. Read more
sourceimpl<'s> Extend<&'s str> for StringTable
impl<'s> Extend<&'s str> for StringTable
sourcefn 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
sourcefn 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.
sourcefn 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 RefUnwindSafe for StringTable
impl Send for StringTable
impl Sync for StringTable
impl Unpin for StringTable
impl UnwindSafe for StringTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more