pub struct MatcherBuilder<'m> { /* private fields */ }
Expand description
Structure used to build a Matcher allowing to customize formatting tags.
Implementations§
Source§impl<'m> MatcherBuilder<'m>
impl<'m> MatcherBuilder<'m>
pub fn new(matching_words: MatchingWords, tokenizer: Tokenizer<'m>) -> Self
pub fn crop_marker(&mut self, marker: String) -> &Self
pub fn highlight_prefix(&mut self, prefix: String) -> &Self
pub fn highlight_suffix(&mut self, suffix: String) -> &Self
pub fn build<'t, 'lang>( &self, text: &'t str, locales: Option<&'lang [Language]>, ) -> Matcher<'t, 'm, '_, 'lang>
Auto Trait Implementations§
impl<'m> Freeze for MatcherBuilder<'m>
impl<'m> RefUnwindSafe for MatcherBuilder<'m>
impl<'m> Send for MatcherBuilder<'m>
impl<'m> Sync for MatcherBuilder<'m>
impl<'m> Unpin for MatcherBuilder<'m>
impl<'m> UnwindSafe for MatcherBuilder<'m>
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