pub struct MatchConfigBuilder<'a, S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<'a, S: State> MatchConfigBuilder<'a, S>
impl<'a, S: State> MatchConfigBuilder<'a, S>
Sourcepub fn build(self) -> MatchConfig<'a>where
S: IsComplete,
pub fn build(self) -> MatchConfig<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn analyze(self, value: bool) -> MatchConfigBuilder<'a, SetAnalyze<S>>where
S::Analyze: IsUnset,
pub fn analyze(self, value: bool) -> MatchConfigBuilder<'a, SetAnalyze<S>>where
S::Analyze: IsUnset,
Optional (Some / Option setters). Default: false
.
For more advanced control over the analysis, use MatchConfigBuilder::analyze_config
.
Sourcepub fn maybe_analyze(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetAnalyze<S>>where
S::Analyze: IsUnset,
pub fn maybe_analyze(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetAnalyze<S>>where
S::Analyze: IsUnset,
Optional (Some / Option setters). Default: false
.
For more advanced control over the analysis, use MatchConfigBuilder::analyze_config
.
Sourcepub fn analyze_config(
self,
value: PatternAnalyzeConfig,
) -> MatchConfigBuilder<'a, SetAnalyzeConfig<S>>where
S::AnalyzeConfig: IsUnset,
pub fn analyze_config(
self,
value: PatternAnalyzeConfig,
) -> MatchConfigBuilder<'a, SetAnalyzeConfig<S>>where
S::AnalyzeConfig: IsUnset,
Sourcepub fn maybe_analyze_config(
self,
value: Option<PatternAnalyzeConfig>,
) -> MatchConfigBuilder<'a, SetAnalyzeConfig<S>>where
S::AnalyzeConfig: IsUnset,
pub fn maybe_analyze_config(
self,
value: Option<PatternAnalyzeConfig>,
) -> MatchConfigBuilder<'a, SetAnalyzeConfig<S>>where
S::AnalyzeConfig: IsUnset,
Sourcepub fn is_pattern_partial(
self,
value: bool,
) -> MatchConfigBuilder<'a, SetIsPatternPartial<S>>where
S::IsPatternPartial: IsUnset,
pub fn is_pattern_partial(
self,
value: bool,
) -> MatchConfigBuilder<'a, SetIsPatternPartial<S>>where
S::IsPatternPartial: IsUnset,
Sourcepub fn maybe_is_pattern_partial(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetIsPatternPartial<S>>where
S::IsPatternPartial: IsUnset,
pub fn maybe_is_pattern_partial(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetIsPatternPartial<S>>where
S::IsPatternPartial: IsUnset,
Sourcepub fn starts_with(
self,
value: bool,
) -> MatchConfigBuilder<'a, SetStartsWith<S>>where
S::StartsWith: IsUnset,
pub fn starts_with(
self,
value: bool,
) -> MatchConfigBuilder<'a, SetStartsWith<S>>where
S::StartsWith: IsUnset,
Sourcepub fn maybe_starts_with(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetStartsWith<S>>where
S::StartsWith: IsUnset,
pub fn maybe_starts_with(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetStartsWith<S>>where
S::StartsWith: IsUnset,
Sourcepub fn ends_with(self, value: bool) -> MatchConfigBuilder<'a, SetEndsWith<S>>where
S::EndsWith: IsUnset,
pub fn ends_with(self, value: bool) -> MatchConfigBuilder<'a, SetEndsWith<S>>where
S::EndsWith: IsUnset,
Sourcepub fn maybe_ends_with(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetEndsWith<S>>where
S::EndsWith: IsUnset,
pub fn maybe_ends_with(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetEndsWith<S>>where
S::EndsWith: IsUnset,
Sourcepub fn plain(
self,
value: Option<PlainMatchConfig>,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
pub fn plain(
self,
value: Option<PlainMatchConfig>,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
Sourcepub fn maybe_plain(
self,
value: Option<Option<PlainMatchConfig>>,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
pub fn maybe_plain(
self,
value: Option<Option<PlainMatchConfig>>,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
Sourcepub fn mix_lang(self, value: bool) -> MatchConfigBuilder<'a, SetMixLang<S>>where
S::MixLang: IsUnset,
pub fn mix_lang(self, value: bool) -> MatchConfigBuilder<'a, SetMixLang<S>>where
S::MixLang: IsUnset,
Sourcepub fn maybe_mix_lang(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetMixLang<S>>where
S::MixLang: IsUnset,
pub fn maybe_mix_lang(
self,
value: Option<bool>,
) -> MatchConfigBuilder<'a, SetMixLang<S>>where
S::MixLang: IsUnset,
Sourcepub fn pinyin(
self,
value: PinyinMatchConfig<'a>,
) -> MatchConfigBuilder<'a, SetPinyin<S>>where
S::Pinyin: IsUnset,
pub fn pinyin(
self,
value: PinyinMatchConfig<'a>,
) -> MatchConfigBuilder<'a, SetPinyin<S>>where
S::Pinyin: IsUnset,
Sourcepub fn maybe_pinyin(
self,
value: Option<PinyinMatchConfig<'a>>,
) -> MatchConfigBuilder<'a, SetPinyin<S>>where
S::Pinyin: IsUnset,
pub fn maybe_pinyin(
self,
value: Option<PinyinMatchConfig<'a>>,
) -> MatchConfigBuilder<'a, SetPinyin<S>>where
S::Pinyin: IsUnset,
Sourcepub fn romaji(
self,
value: RomajiMatchConfig<'a>,
) -> MatchConfigBuilder<'a, SetRomaji<S>>where
S::Romaji: IsUnset,
pub fn romaji(
self,
value: RomajiMatchConfig<'a>,
) -> MatchConfigBuilder<'a, SetRomaji<S>>where
S::Romaji: IsUnset,
Sourcepub fn maybe_romaji(
self,
value: Option<RomajiMatchConfig<'a>>,
) -> MatchConfigBuilder<'a, SetRomaji<S>>where
S::Romaji: IsUnset,
pub fn maybe_romaji(
self,
value: Option<RomajiMatchConfig<'a>>,
) -> MatchConfigBuilder<'a, SetRomaji<S>>where
S::Romaji: IsUnset,
Source§impl<'a, S: State> MatchConfigBuilder<'a, S>
impl<'a, S: State> MatchConfigBuilder<'a, S>
Sourcepub fn case_insensitive(
self,
case_insensitive: bool,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
pub fn case_insensitive(
self,
case_insensitive: bool,
) -> MatchConfigBuilder<'a, SetPlain<S>>where
S::Plain: IsUnset,
A convenient setter for PlainMatchConfigBuilder::case_insensitive
.
The case insensitivity of pinyin is controlled by PinyinMatchConfigBuilder::case_insensitive
.
Auto Trait Implementations§
impl<'a, S = Empty> !Freeze for MatchConfigBuilder<'a, S>
impl<'a, S> RefUnwindSafe for MatchConfigBuilder<'a, S>
impl<'a, S> Send for MatchConfigBuilder<'a, S>
impl<'a, S> Sync for MatchConfigBuilder<'a, S>
impl<'a, S> Unpin for MatchConfigBuilder<'a, S>
impl<'a, S> UnwindSafe for MatchConfigBuilder<'a, S>
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> 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