pub struct Extractor { /* private fields */ }Expand description
Reusable trigram extractor. Pre-allocated, reused across files.
Implementations§
Source§impl Extractor
impl Extractor
Sourcepub fn extract_with_offsets(&mut self, data: &[u8]) -> &[(Trigram, u32)]
pub fn extract_with_offsets(&mut self, data: &[u8]) -> &[(Trigram, u32)]
Extract trigrams with byte offsets (for indexing).
Returns a slice of (trigram, offset) pairs, sorted by trigram then offset.
Sourcepub fn extract_set(query: &[u8]) -> Vec<Trigram> ⓘ
pub fn extract_set(query: &[u8]) -> Vec<Trigram> ⓘ
Extract unique trigram set from a query (no offsets needed).
Sourcepub fn extract_groups_case_insensitive(query: &[u8]) -> Vec<Vec<Trigram>>
pub fn extract_groups_case_insensitive(query: &[u8]) -> Vec<Vec<Trigram>>
Extract trigram groups with case permutations for case-insensitive search.
Returns one group per original trigram position. Each group contains all case variants for that position (max 8 per group for 3 ASCII alpha bytes). The executor should UNION within each group and INTERSECT across groups.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Extractor
impl RefUnwindSafe for Extractor
impl Send for Extractor
impl Sync for Extractor
impl Unpin for Extractor
impl UnsafeUnpin for Extractor
impl UnwindSafe for Extractor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more