Struct icu_datetime::provider::date_time::PatternSelector
source ยท pub struct PatternSelector<'a, D: ?Sized> {
data_provider: &'a D,
date_patterns_data: DataPayload<ErasedDateLengthsV1Marker>,
locale: &'a DataLocale,
cal_val: Option<&'a Value>,
}
Expand description
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Fieldsยง
ยงdata_provider: &'a D
ยงdate_patterns_data: DataPayload<ErasedDateLengthsV1Marker>
ยงlocale: &'a DataLocale
ยงcal_val: Option<&'a Value>
Implementationsยง
sourceยงimpl<D> PatternSelector<'_, D>
impl<D> PatternSelector<'_, D>
pub(crate) fn for_options<'a>( data_provider: &'a D, date_patterns_data: DataPayload<ErasedDateLengthsV1Marker>, locale: &'a DataLocale, options: &DateTimeFormatterOptions, ) -> Result<DataPayload<PatternPluralsFromPatternsV1Marker>, PatternForLengthError>
sourcefn pattern_for_length_bag(
self,
length: &Bag,
preferences: Option<Bag>,
) -> Result<DataPayload<PatternPluralsFromPatternsV1Marker>, PatternForLengthError>
fn pattern_for_length_bag( self, length: &Bag, preferences: Option<Bag>, ) -> Result<DataPayload<PatternPluralsFromPatternsV1Marker>, PatternForLengthError>
Determine the appropriate Pattern
for a given options::Length
bag.
sourcefn pattern_for_datetime_length(
self,
date_length: Date,
time_length: Time,
preferences: Option<Bag>,
) -> Result<DataPayload<PatternPluralsFromPatternsV1Marker>, PatternForLengthError>
fn pattern_for_datetime_length( self, date_length: Date, time_length: Time, preferences: Option<Bag>, ) -> Result<DataPayload<PatternPluralsFromPatternsV1Marker>, PatternForLengthError>
Determine the appropriate Pattern
for a given options::length::Date
and
options::length::Time
bag.
Trait Implementationsยง
Auto Trait Implementationsยง
impl<'a, D> Freeze for PatternSelector<'a, D>where
D: ?Sized,
impl<'a, D> RefUnwindSafe for PatternSelector<'a, D>where
D: RefUnwindSafe + ?Sized,
impl<'a, D> !Send for PatternSelector<'a, D>
impl<'a, D> !Sync for PatternSelector<'a, D>
impl<'a, D> Unpin for PatternSelector<'a, D>where
D: ?Sized,
impl<'a, D> UnwindSafe for PatternSelector<'a, D>where
D: RefUnwindSafe + ?Sized,
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