pub struct StringIndex { /* private fields */ }Expand description
A sorted index over an existing StringPool for fast prefix searches.
Implementations§
Source§impl StringIndex
impl StringIndex
Sourcepub fn build(pool: &StringPool) -> Self
pub fn build(pool: &StringPool) -> Self
Build the index from a pool.
Sourcepub fn find_prefix(&self, prefix: &str) -> Vec<InternedString>
pub fn find_prefix(&self, prefix: &str) -> Vec<InternedString>
Find all interned strings with the given prefix.
Sourcepub fn find_suffix(&self, suffix: &str) -> Vec<InternedString>
pub fn find_suffix(&self, suffix: &str) -> Vec<InternedString>
Find all interned strings with the given suffix.
Sourcepub fn find_contains(&self, sub: &str) -> Vec<InternedString>
pub fn find_contains(&self, sub: &str) -> Vec<InternedString>
Find all interned strings containing the given substring.
Auto Trait Implementations§
impl Freeze for StringIndex
impl RefUnwindSafe for StringIndex
impl Send for StringIndex
impl Sync for StringIndex
impl Unpin for StringIndex
impl UnsafeUnpin for StringIndex
impl UnwindSafe for StringIndex
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