#[non_exhaustive]pub enum DateFieldSet {
D(D),
MD(MD),
YMD(YMD),
DE(DE),
MDE(MDE),
YMDE(YMDE),
E(E),
}
Expand description
An enumeration over all possible date field sets.
📏 Note: This enum can be used as the field set parameter of
DateTimeFormatter
, but doing so may link
more formatting data compared to the individual field set structs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
D(D)
The day of the month, as in “on the 1st”.
MD(MD)
The month and day of the month, as in “January 1st”.
YMD(YMD)
The year, month, and day of the month, as in “January 1st, 2000”.
DE(DE)
The day of the month and day of the week, as in “Saturday 1st”.
MDE(MDE)
The month, day of the month, and day of the week, as in “Saturday, January 1st”.
YMDE(YMDE)
The year, month, day of the month, and day of the week, as in “Saturday, January 1st, 2000”.
E(E)
The day of the week alone, as in “Saturday”.
Implementations§
source§impl DateFieldSet
impl DateFieldSet
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::DateFieldSet as FS;
use icu_provider::DataMarkerAttributes;
assert!(FS::ALL_DATA_MARKER_ATTRIBUTES.contains(
&DataMarkerAttributes::from_str_or_panic("d")
));
source§impl DateFieldSet
impl DateFieldSet
sourcepub fn z(self) -> Combo<DateFieldSet, Zs>
pub fn z(self) -> Combo<DateFieldSet, Zs>
Associates this field set with a specific non-location format time zone, as in “Pacific Daylight Time”.
sourcepub fn o(self) -> Combo<DateFieldSet, O>
pub fn o(self) -> Combo<DateFieldSet, O>
Associates this field set with an offset format time zone, as in “GMT−8”.
sourcepub fn v(self) -> Combo<DateFieldSet, Vs>
pub fn v(self) -> Combo<DateFieldSet, Vs>
Associates this field set with a generic non-location format time zone, as in “Pacific Time”.
sourcepub fn l(self) -> Combo<DateFieldSet, L>
pub fn l(self) -> Combo<DateFieldSet, L>
Associates this field set with a location format time zone, as in “Los Angeles time”.
Trait Implementations§
source§impl Clone for DateFieldSet
impl Clone for DateFieldSet
source§fn clone(&self) -> DateFieldSet
fn clone(&self) -> DateFieldSet
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl DateDataMarkers for DateFieldSet
impl DateDataMarkers for DateFieldSet
source§type Skel = FullDataCalMarkers
type Skel = FullDataCalMarkers
source§type Year = FullDataCalMarkers
type Year = FullDataCalMarkers
source§type Month = FullDataCalMarkers
type Month = FullDataCalMarkers
source§type WeekdayNamesV1Marker = WeekdayNamesV1Marker
type WeekdayNamesV1Marker = WeekdayNamesV1Marker
source§impl DateInputMarkers for DateFieldSet
impl DateInputMarkers for DateFieldSet
source§type MonthInput = MonthInfo
type MonthInput = MonthInfo
source§type DayOfMonthInput = DayOfMonth
type DayOfMonthInput = DayOfMonth
source§type DayOfYearInput = DayOfYearInfo
type DayOfYearInput = DayOfYearInfo
source§type DayOfWeekInput = IsoWeekday
type DayOfWeekInput = IsoWeekday
source§impl DateTimeMarkers for DateFieldSet
impl DateTimeMarkers for DateFieldSet
source§type D = DateFieldSet
type D = DateFieldSet
source§type T = NeoNeverMarker
type T = NeoNeverMarker
source§type Z = NeoNeverMarker
type Z = NeoNeverMarker
source§type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
source§impl Debug for DateFieldSet
impl Debug for DateFieldSet
source§impl GetField<CompositeFieldSet> for DateFieldSet
impl GetField<CompositeFieldSet> for DateFieldSet
source§fn get_field(&self) -> CompositeFieldSet
fn get_field(&self) -> CompositeFieldSet
T
.source§impl PartialEq for DateFieldSet
impl PartialEq for DateFieldSet
source§impl<C> TypedDateDataMarkers<C> for DateFieldSetwhere
C: CldrCalendar,
impl<C> TypedDateDataMarkers<C> for DateFieldSetwhere
C: CldrCalendar,
source§type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
source§type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
source§type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
source§type WeekdayNamesV1Marker = WeekdayNamesV1Marker
type WeekdayNamesV1Marker = WeekdayNamesV1Marker
impl Copy for DateFieldSet
impl Eq for DateFieldSet
impl StructuralPartialEq for DateFieldSet
impl UnstableSealed for DateFieldSet
Auto Trait Implementations§
impl Freeze for DateFieldSet
impl RefUnwindSafe for DateFieldSet
impl Send for DateFieldSet
impl Sync for DateFieldSet
impl Unpin for DateFieldSet
impl UnwindSafe for DateFieldSet
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
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)
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>
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>
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