pub struct TriePool { /* private fields */ }Expand description
A string pool backed by a trie for fast prefix enumeration.
Implementations§
Source§impl TriePool
impl TriePool
Sourcepub fn insert(&mut self, s: &str) -> InternedString
pub fn insert(&mut self, s: &str) -> InternedString
Insert a string into the trie pool.
Sourcepub fn find_prefix(&self, prefix: &str) -> Vec<InternedString>
pub fn find_prefix(&self, prefix: &str) -> Vec<InternedString>
Find all strings with the given prefix.
Sourcepub fn get(&self, s: &str) -> Option<InternedString>
pub fn get(&self, s: &str) -> Option<InternedString>
Exact lookup.
Sourcepub fn resolve(&self, id: InternedString) -> Option<&str>
pub fn resolve(&self, id: InternedString) -> Option<&str>
Resolve an interned string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TriePool
impl RefUnwindSafe for TriePool
impl Send for TriePool
impl Sync for TriePool
impl Unpin for TriePool
impl UnsafeUnpin for TriePool
impl UnwindSafe for TriePool
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