Struct icu_datetime::fields::Field
source · [−]pub struct Field {
pub symbol: FieldSymbol,
pub length: FieldLength,
}
Expand description
A field within a date pattern string, also referred to as a date field. A date field is the repetition of a specific pattern character one or more times within the pattern string. The pattern character is known as the field symbol, which indicates the particular meaning for the field.
Fields
symbol: FieldSymbol
The field symbol for the Field
, which corresponds to the field’s meaning with the
date pattern.
length: FieldLength
The length of the Field
, which in conjunction with the FieldSymbol
informs the width or
style of the formatting output corresponding to this field.
Trait Implementations
sourceimpl Bake for Field
impl Bake for Field
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evalutate to self
. Read more
sourceimpl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<(FieldSymbol, FieldLength)> for Field
impl From<(FieldSymbol, FieldLength)> for Field
sourcefn from(input: (FieldSymbol, FieldLength)) -> Self
fn from(input: (FieldSymbol, FieldLength)) -> Self
Converts to this type from the input type.
sourceimpl From<TimeZoneName> for Field
impl From<TimeZoneName> for Field
sourcefn from(time_zone_name: TimeZoneName) -> Self
fn from(time_zone_name: TimeZoneName) -> Self
Converts to this type from the input type.
sourceimpl Ord for Field
impl Ord for Field
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Field> for Field
impl PartialOrd<Field> for Field
sourcefn partial_cmp(&self, other: &Field) -> Option<Ordering>
fn partial_cmp(&self, other: &Field) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryFrom<(FieldSymbol, usize)> for Field
impl TryFrom<(FieldSymbol, usize)> for Field
sourceimpl<'a> ZeroMapKV<'a> for Field
impl<'a> ZeroMapKV<'a> for Field
impl Copy for Field
impl Eq for Field
impl StructuralEq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more