#[repr(u8)]pub enum TextAnalyzerV1 {
KeywordV1 = 1,
StandardV1 = 2,
}Expand description
Closed tokenized-text analyzer vocabulary for ADR-0173 v1.
Variants§
KeywordV1 = 1
Preserve the complete source value as exactly one term.
StandardV1 = 2
Unicode 17.0.0 UAX #29 word segmentation, then unicode_fold_v1.
Implementations§
Source§impl TextAnalyzerV1
impl TextAnalyzerV1
Sourcepub const fn from_discriminant(value: u8) -> Option<Self>
pub const fn from_discriminant(value: u8) -> Option<Self>
Decodes the byte-frozen analyzer discriminant.
Sourcepub fn analyze(self, value: &str) -> TextAnalyzerTermsV1<'_> ⓘ
pub fn analyze(self, value: &str) -> TextAnalyzerTermsV1<'_> ⓘ
Analyzes one already-bounded source value without retaining the result.
keyword_v1 emits once even for the empty string. standard_v1
segments before folding, as ADR-0173 specifies, and assigns consecutive
zero-based positions to emitted words.
Trait Implementations§
Source§impl Clone for TextAnalyzerV1
impl Clone for TextAnalyzerV1
impl Copy for TextAnalyzerV1
Source§impl Debug for TextAnalyzerV1
impl Debug for TextAnalyzerV1
impl Eq for TextAnalyzerV1
Source§impl Hash for TextAnalyzerV1
impl Hash for TextAnalyzerV1
Source§impl Ord for TextAnalyzerV1
impl Ord for TextAnalyzerV1
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for TextAnalyzerV1
impl PartialEq for TextAnalyzerV1
Source§impl PartialOrd for TextAnalyzerV1
impl PartialOrd for TextAnalyzerV1
impl StructuralPartialEq for TextAnalyzerV1
Auto Trait Implementations§
impl Freeze for TextAnalyzerV1
impl RefUnwindSafe for TextAnalyzerV1
impl Send for TextAnalyzerV1
impl Sync for TextAnalyzerV1
impl Unpin for TextAnalyzerV1
impl UnsafeUnpin for TextAnalyzerV1
impl UnwindSafe for TextAnalyzerV1
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