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.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Field, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Field, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for Field
This trait is implemented for compatibility with fmt!
.
To create a string, Writeable::write_to_string
is usually more efficient.
impl Display for Field
This trait is implemented for compatibility with fmt!
.
To create a string, Writeable::write_to_string
is usually more efficient.
Source§impl From<(FieldSymbol, FieldLength)> for Field
impl From<(FieldSymbol, FieldLength)> for Field
Source§fn from(input: (FieldSymbol, FieldLength)) -> Field
fn from(input: (FieldSymbol, FieldLength)) -> Field
Source§impl From<ErrorField> for Field
impl From<ErrorField> for Field
Source§fn from(value: ErrorField) -> Field
fn from(value: ErrorField) -> Field
Recover a Field
(unstable) from an ErrorField
(stable wrapper)
Source§impl From<Field> for ErrorField
impl From<Field> for ErrorField
Source§fn from(value: Field) -> ErrorField
fn from(value: Field) -> ErrorField
Create an ErrorField
(stable wrapper) from a Field
(unstable)
Source§impl Ord for Field
impl Ord for Field
Source§impl PartialOrd for Field
impl PartialOrd for Field
Source§impl Writeable for Field
impl Writeable for Field
Source§fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
write_to_parts
, and discards any
Part
annotations.Source§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
Source§fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
S: PartsWrite + ?Sized,
fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
S: PartsWrite + ?Sized,
Part
annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to
,
and doesn’t produce any Part
annotations.Source§impl<'a> ZeroMapKV<'a> for Field
impl<'a> ZeroMapKV<'a> for Field
impl Copy for Field
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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§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