pub struct PinyinMatchConfigBuilder<'a, S: State = Empty> { /* private fields */ }
Available on crate feature
pinyin
only.Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<'a, S: State> PinyinMatchConfigBuilder<'a, S>
impl<'a, S: State> PinyinMatchConfigBuilder<'a, S>
Sourcepub fn build(self) -> PinyinMatchConfig<'a>where
S: IsComplete,
pub fn build(self) -> PinyinMatchConfig<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn data(
self,
data: &'a PinyinData,
) -> PinyinMatchConfigBuilder<'a, SetData<S>>where
S::Data: IsUnset,
pub fn data(
self,
data: &'a PinyinData,
) -> PinyinMatchConfigBuilder<'a, SetData<S>>where
S::Data: IsUnset,
Optional (Some / Option setters). Default: Cow::Owned(PinyinData::new(notations))
.
Default: new()
on PinyinMatchConfigBuilder::build()
Must be inited with required notations if inmut-data
feature is not enabled.
Sourcepub fn maybe_data(
self,
value: Option<&'a PinyinData>,
) -> PinyinMatchConfigBuilder<'a, SetData<S>>where
S::Data: IsUnset,
pub fn maybe_data(
self,
value: Option<&'a PinyinData>,
) -> PinyinMatchConfigBuilder<'a, SetData<S>>where
S::Data: IsUnset,
Optional (Some / Option setters). Default: Cow::Owned(PinyinData::new(notations))
.
Default: new()
on PinyinMatchConfigBuilder::build()
Must be inited with required notations if inmut-data
feature is not enabled.
Sourcepub fn case_insensitive(
self,
value: bool,
) -> PinyinMatchConfigBuilder<'a, SetCaseInsensitive<S>>where
S::CaseInsensitive: IsUnset,
pub fn case_insensitive(
self,
value: bool,
) -> PinyinMatchConfigBuilder<'a, SetCaseInsensitive<S>>where
S::CaseInsensitive: IsUnset,
Sourcepub fn maybe_case_insensitive(
self,
value: Option<bool>,
) -> PinyinMatchConfigBuilder<'a, SetCaseInsensitive<S>>where
S::CaseInsensitive: IsUnset,
pub fn maybe_case_insensitive(
self,
value: Option<bool>,
) -> PinyinMatchConfigBuilder<'a, SetCaseInsensitive<S>>where
S::CaseInsensitive: IsUnset,
Sourcepub fn allow_partial_pattern(
self,
value: bool,
) -> PinyinMatchConfigBuilder<'a, SetAllowPartialPattern<S>>where
S::AllowPartialPattern: IsUnset,
pub fn allow_partial_pattern(
self,
value: bool,
) -> PinyinMatchConfigBuilder<'a, SetAllowPartialPattern<S>>where
S::AllowPartialPattern: IsUnset,
Sourcepub fn maybe_allow_partial_pattern(
self,
value: Option<bool>,
) -> PinyinMatchConfigBuilder<'a, SetAllowPartialPattern<S>>where
S::AllowPartialPattern: IsUnset,
pub fn maybe_allow_partial_pattern(
self,
value: Option<bool>,
) -> PinyinMatchConfigBuilder<'a, SetAllowPartialPattern<S>>where
S::AllowPartialPattern: IsUnset,
Auto Trait Implementations§
impl<'a, S = Empty> !Freeze for PinyinMatchConfigBuilder<'a, S>
impl<'a, S> RefUnwindSafe for PinyinMatchConfigBuilder<'a, S>
impl<'a, S> Send for PinyinMatchConfigBuilder<'a, S>
impl<'a, S> Sync for PinyinMatchConfigBuilder<'a, S>
impl<'a, S> Unpin for PinyinMatchConfigBuilder<'a, S>
impl<'a, S> UnwindSafe for PinyinMatchConfigBuilder<'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