pub struct Text<C, T>{ /* private fields */ }Expand description
A text structure used as the target for pattern searching in the index.
Not only does it contain the text, but also the maximum character value in the text. This is used to determine the number of bits needed to store the characters in the text.
Implementations§
Source§impl<C, T> Text<C, T>
impl<C, T> Text<C, T>
Sourcepub fn with_max_character(text: T, max_character: C) -> Self
pub fn with_max_character(text: T, max_character: C) -> Self
Create a new text structure with the given text and the largest character value.
This is used when the maximum character value is known in advance.
Sourcepub fn max_character(&self) -> C
pub fn max_character(&self) -> C
Return the maximum character value in the text.
Auto Trait Implementations§
impl<C, T> Freeze for Text<C, T>
impl<C, T> RefUnwindSafe for Text<C, T>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, T> Send for Text<C, T>
impl<C, T> Sync for Text<C, T>
impl<C, T> Unpin for Text<C, T>
impl<C, T> UnwindSafe for Text<C, T>where
T: UnwindSafe,
C: UnwindSafe,
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