Enum icu::datetime::fields::FieldLength
source · pub enum FieldLength {
One,
TwoDigit,
Abbreviated,
Wide,
Narrow,
Six,
Fixed(u8),
}
Expand description
An enum representing the length of a field within a date or time formatting pattern string,
in which the pattern field is represented as a letter occurring 1 or more times in a row, ex:
MMM
, dd
, y
. See the
LDML documentation in UTS 35
for more details.
Variants§
One
Typical style is 1-2 digits. For numeric-only fields.
TwoDigit
Typical style is 2 digits. For numeric-only fields.
Abbreviated
Abbreviated (spellout) format.
Wide
Wide / Long / Full (spellout) format.
Narrow
Narrow / Long / Full (spellout) format.
Six
Meaning is field-dependent, for patterns that are 6 characters long. Ex: a [Weekday
] pattern like
EEEEEE
means “Short”, but jjjjjj
or CCCCCC
for [Hour
] may mean
“Numeric hour (2 digits, zero pad if needed), narrow dayPeriod if used”. See the
LDML documentation in UTS 35
for more details.
Fixed(u8)
A fixed size format for numeric-only fields that is at most 127 digits.
Trait Implementations§
source§impl AsULE for FieldLength
impl AsULE for FieldLength
source§fn to_unaligned(self) -> <FieldLength as AsULE>::ULE
fn to_unaligned(self) -> <FieldLength as AsULE>::ULE
source§fn from_unaligned(unaligned: <FieldLength as AsULE>::ULE) -> FieldLength
fn from_unaligned(unaligned: <FieldLength as AsULE>::ULE) -> FieldLength
source§impl Clone for FieldLength
impl Clone for FieldLength
source§fn clone(&self) -> FieldLength
fn clone(&self) -> FieldLength
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldLength
impl Debug for FieldLength
source§impl<'de> Deserialize<'de> for FieldLength
impl<'de> Deserialize<'de> for FieldLength
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<FieldLength, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<FieldLength, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl Ord for FieldLength
impl Ord for FieldLength
source§fn cmp(&self, other: &FieldLength) -> Ordering
fn cmp(&self, other: &FieldLength) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<FieldLength> for FieldLength
impl PartialEq<FieldLength> for FieldLength
source§fn eq(&self, other: &FieldLength) -> bool
fn eq(&self, other: &FieldLength) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FieldLength> for FieldLength
impl PartialOrd<FieldLength> for FieldLength
source§fn partial_cmp(&self, other: &FieldLength) -> Option<Ordering>
fn partial_cmp(&self, other: &FieldLength) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more