#[non_exhaustive]pub enum CalendarPeriodFieldSet {
M(M),
YM(YM),
Y(Y),
}
Expand description
An enumeration over all possible calendar period field sets.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
M(M)
A standalone month, as in “January”.
YM(YM)
A month and year, as in “January 2000”.
Y(Y)
A year, as in “2000”.
Implementations§
source§impl CalendarPeriodFieldSet
impl CalendarPeriodFieldSet
sourcepub const ALL_DATA_MARKER_ATTRIBUTES: &'static [&'static DataMarkerAttributes] = _
pub const ALL_DATA_MARKER_ATTRIBUTES: &'static [&'static DataMarkerAttributes] = _
All attributes associated with this enum.
§Encoding Details
The string is based roughly on the UTS 35 symbol table with the following exceptions:
- Lowercase letters are chosen where there is no ambiguity:
E
becomese
- Capitals are replaced with their lowercase and a number 0:
M
becomesm0
- A single symbol is included for each component: length doesn’t matter
- Time fields are encoded with their hour field only:
j
,h
, orh0
§Examples
use icu::datetime::fieldset::dynamic::CalendarPeriodFieldSet as FS;
use icu_provider::DataMarkerAttributes;
assert!(FS::ALL_DATA_MARKER_ATTRIBUTES.contains(
&DataMarkerAttributes::from_str_or_panic("m0")
));
Trait Implementations§
source§impl Clone for CalendarPeriodFieldSet
impl Clone for CalendarPeriodFieldSet
source§fn clone(&self) -> CalendarPeriodFieldSet
fn clone(&self) -> CalendarPeriodFieldSet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl DateDataMarkers for CalendarPeriodFieldSet
impl DateDataMarkers for CalendarPeriodFieldSet
source§type Skel = FullDataCalMarkers
type Skel = FullDataCalMarkers
Cross-calendar data markers for date skeleta.
source§type Year = FullDataCalMarkers
type Year = FullDataCalMarkers
Cross-calendar data markers for year names.
source§type Month = FullDataCalMarkers
type Month = FullDataCalMarkers
Cross-calendar data markers for month names.
source§type WeekdayNamesV1Marker = NeverMarker<LinearNamesV1<'static>>
type WeekdayNamesV1Marker = NeverMarker<LinearNamesV1<'static>>
Marker for loading weekday names.
source§impl DateInputMarkers for CalendarPeriodFieldSet
impl DateInputMarkers for CalendarPeriodFieldSet
source§type MonthInput = MonthInfo
type MonthInput = MonthInfo
Marker for resolving the month input field.
source§type DayOfMonthInput = ()
type DayOfMonthInput = ()
Marker for resolving the day-of-month input field.
source§type DayOfWeekInput = ()
type DayOfWeekInput = ()
Marker for resolving the day-of-week input field.
source§type DayOfYearInput = ()
type DayOfYearInput = ()
Marker for resolving the day-of-year input field.
source§impl DateTimeMarkers for CalendarPeriodFieldSet
impl DateTimeMarkers for CalendarPeriodFieldSet
source§type D = CalendarPeriodFieldSet
type D = CalendarPeriodFieldSet
Associated types for date formatting. Read more
source§type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
Marker for loading the date/time glue pattern.
source§impl DateTimeNamesMarker for CalendarPeriodFieldSet
impl DateTimeNamesMarker for CalendarPeriodFieldSet
type YearNames = YearNamesV1Marker
type MonthNames = MonthNamesV1Marker
type WeekdayNames = ()
type DayPeriodNames = ()
type ZoneEssentials = ()
type ZoneLocations = ()
type ZoneGenericLong = ()
type ZoneGenericShort = ()
type ZoneSpecificLong = ()
type ZoneSpecificShort = ()
type MetazoneLookup = ()
source§impl Debug for CalendarPeriodFieldSet
impl Debug for CalendarPeriodFieldSet
source§impl GetField<CompositeFieldSet> for CalendarPeriodFieldSet
impl GetField<CompositeFieldSet> for CalendarPeriodFieldSet
source§fn get_field(&self) -> CompositeFieldSet
fn get_field(&self) -> CompositeFieldSet
Returns the value of this trait’s field
T
.source§impl PartialEq for CalendarPeriodFieldSet
impl PartialEq for CalendarPeriodFieldSet
source§impl<C> TypedDateDataMarkers<C> for CalendarPeriodFieldSetwhere
C: CldrCalendar,
impl<C> TypedDateDataMarkers<C> for CalendarPeriodFieldSetwhere
C: CldrCalendar,
source§type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
Marker for loading date skeleton patterns.
source§type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
Marker for loading year names.
source§type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
Marker for loading month names.
source§type WeekdayNamesV1Marker = NeverMarker<LinearNamesV1<'static>>
type WeekdayNamesV1Marker = NeverMarker<LinearNamesV1<'static>>
Marker for loading weekday names.
impl Copy for CalendarPeriodFieldSet
impl Eq for CalendarPeriodFieldSet
impl StructuralPartialEq for CalendarPeriodFieldSet
impl UnstableSealed for CalendarPeriodFieldSet
Auto Trait Implementations§
impl Freeze for CalendarPeriodFieldSet
impl RefUnwindSafe for CalendarPeriodFieldSet
impl Send for CalendarPeriodFieldSet
impl Sync for CalendarPeriodFieldSet
impl Unpin for CalendarPeriodFieldSet
impl UnwindSafe for CalendarPeriodFieldSet
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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