Enum icu::datetime::fields::FieldLength
source · pub enum FieldLength {
One,
Two,
Three,
Four,
Five,
Six,
NumericOverride(FieldNumericOverrides),
}
Expand description
An enum representing the length of a field within a date or time formatting pattern string.
Such strings represent fields 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
Numeric: minimum digits
Text: same as Self::Three
Two
Numeric: pad to 2 digits
Text: same as Self::Three
Three
Numeric: pad to 3 digits
Text: Abbreviated format.
Four
Numeric: pad to 4 digits
Text: Wide format.
Five
Numeric: pad to 5 digits
Text: Narrow format.
Six
Numeric: pad to 6 digits
Text: Short format.
NumericOverride(FieldNumericOverrides)
FieldLength::One (numeric), but overridden with a different numbering system
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 Bake for FieldLength
impl Bake for FieldLength
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl BakeSize for FieldLength
impl BakeSize for FieldLength
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
source§impl Clone for FieldLength
impl Clone for FieldLength
source§fn clone(&self) -> FieldLength
fn clone(&self) -> FieldLength
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 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>,
Deserialize this value from the given Serde deserializer. Read more
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,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for FieldLength
impl PartialEq for FieldLength
source§impl PartialOrd for FieldLength
impl PartialOrd for FieldLength
source§impl Serialize for FieldLength
impl Serialize for FieldLength
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for FieldLength
impl Eq for FieldLength
impl StructuralPartialEq for FieldLength
Auto Trait Implementations§
impl Freeze for FieldLength
impl RefUnwindSafe for FieldLength
impl Send for FieldLength
impl Sync for FieldLength
impl Unpin for FieldLength
impl UnwindSafe for FieldLength
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