pub struct BTreeStringTable<'a> { /* private fields */ }
Expand description
Default implementation just maintains a btree keyed on a 64-bit fxhash value
Implementations§
source§impl<'a> BTreeStringTable<'a>
impl<'a> BTreeStringTable<'a>
Trait Implementations§
source§impl<'a> Clone for BTreeStringTable<'a>
impl<'a> Clone for BTreeStringTable<'a>
source§fn clone(&self) -> Self
fn clone(&self) -> Self
Clone the contents of a given BTreeStringTable instance
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<'a> StringTable<'a, u64> for BTreeStringTable<'a>
impl<'a> StringTable<'a, u64> for BTreeStringTable<'a>
source§fn add(&mut self, value: &str) -> u64
fn add(&mut self, value: &str) -> u64
Add a new value to the string table. Returns the u32 hash value
of the entry. If the entry already exists within the table, then
this operation is idempotent, but the hash value is still returned.
source§fn get(&self, key: u64) -> Option<&Cow<'a, str>>
fn get(&self, key: u64) -> Option<&Cow<'a, str>>
Attempts to retrieve a given value from the table.