pub enum FieldSymbol {
Era,
Year(Year),
Month(Month),
Week(Week),
Day(Day),
Weekday(Weekday),
DayPeriod(DayPeriod),
Hour(Hour),
Minute,
Second(Second),
TimeZone(TimeZone),
}
Expand description
A field symbol for a date formatting pattern. Field symbols are a more granular distinction
for a pattern field within the category of a field type. Examples of field types are:
Year
, Month
, Hour
. Within the Hour
field type, examples of field symbols are: Hour::H12
,
Hour::H24
. Each field symbol is represented within the date formatting pattern string
by a distinct character from the set of A..Z
and a..z
.
Variants
Era
Era name.
Year(Year)
Year number or year name.
Month(Month)
Month number or month name.
Week(Week)
Week number or week name.
Day(Day)
Day number relative to a time period longer than a week (ex: month, year).
Weekday(Weekday)
Day number or day name relative to a week.
DayPeriod(DayPeriod)
Name of a period within a day.
Hour(Hour)
Hour number within a day, possibly with day period.
Minute
Minute number within an hour.
Second(Second)
Seconds number within a minute, including fractional seconds, or milliseconds within a day.
TimeZone(TimeZone)
Time zone as a name, a zone ID, or a ISO 8601 numerical offset.
Trait Implementations
sourceimpl AsULE for FieldSymbol
impl AsULE for FieldSymbol
type ULE = FieldSymbolULE
type ULE = FieldSymbolULE
The ULE type corresponding to Self
. Read more
sourcefn to_unaligned(self) -> <FieldSymbol as AsULE>::ULE
fn to_unaligned(self) -> <FieldSymbol as AsULE>::ULE
Converts from Self
to Self::ULE
. Read more
sourcefn from_unaligned(unaligned: <FieldSymbol as AsULE>::ULE) -> FieldSymbol
fn from_unaligned(unaligned: <FieldSymbol as AsULE>::ULE) -> FieldSymbol
Converts from Self::ULE
to Self
. Read more
sourceimpl Bake for FieldSymbol
impl Bake for FieldSymbol
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl Clone for FieldSymbol
impl Clone for FieldSymbol
sourcefn clone(&self) -> FieldSymbol
fn clone(&self) -> FieldSymbol
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FieldSymbol
impl Debug for FieldSymbol
sourceimpl<'de> Deserialize<'de> for FieldSymbol
impl<'de> Deserialize<'de> for FieldSymbol
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<FieldSymbol, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<FieldSymbol, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Day> for FieldSymbol
impl From<Day> for FieldSymbol
sourcefn from(input: Day) -> FieldSymbol
fn from(input: Day) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<DayPeriod> for FieldSymbol
impl From<DayPeriod> for FieldSymbol
sourcefn from(input: DayPeriod) -> FieldSymbol
fn from(input: DayPeriod) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Hour> for FieldSymbol
impl From<Hour> for FieldSymbol
sourcefn from(input: Hour) -> FieldSymbol
fn from(input: Hour) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Month> for FieldSymbol
impl From<Month> for FieldSymbol
sourcefn from(input: Month) -> FieldSymbol
fn from(input: Month) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Second> for FieldSymbol
impl From<Second> for FieldSymbol
sourcefn from(input: Second) -> FieldSymbol
fn from(input: Second) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<TimeZone> for FieldSymbol
impl From<TimeZone> for FieldSymbol
sourcefn from(input: TimeZone) -> FieldSymbol
fn from(input: TimeZone) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Week> for FieldSymbol
impl From<Week> for FieldSymbol
sourcefn from(input: Week) -> FieldSymbol
fn from(input: Week) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Weekday> for FieldSymbol
impl From<Weekday> for FieldSymbol
sourcefn from(input: Weekday) -> FieldSymbol
fn from(input: Weekday) -> FieldSymbol
Converts to this type from the input type.
sourceimpl From<Year> for FieldSymbol
impl From<Year> for FieldSymbol
sourcefn from(input: Year) -> FieldSymbol
fn from(input: Year) -> FieldSymbol
Converts to this type from the input type.
sourceimpl Ord for FieldSymbol
impl Ord for FieldSymbol
sourceimpl PartialEq<FieldSymbol> for FieldSymbol
impl PartialEq<FieldSymbol> for FieldSymbol
sourcefn eq(&self, other: &FieldSymbol) -> bool
fn eq(&self, other: &FieldSymbol) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FieldSymbol) -> bool
fn ne(&self, other: &FieldSymbol) -> bool
This method tests for !=
.
sourceimpl PartialOrd<FieldSymbol> for FieldSymbol
impl PartialOrd<FieldSymbol> for FieldSymbol
sourcefn partial_cmp(&self, other: &FieldSymbol) -> Option<Ordering>
fn partial_cmp(&self, other: &FieldSymbol) -> 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 Serialize for FieldSymbol
impl Serialize for FieldSymbol
sourcefn 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
sourceimpl TryFrom<char> for FieldSymbol
impl TryFrom<char> for FieldSymbol
type Error = SymbolError
type Error = SymbolError
The type returned in the event of a conversion error.
sourcefn try_from(
ch: char
) -> Result<FieldSymbol, <FieldSymbol as TryFrom<char>>::Error>
fn try_from(
ch: char
) -> Result<FieldSymbol, <FieldSymbol as TryFrom<char>>::Error>
Performs the conversion.
impl Copy for FieldSymbol
impl Eq for FieldSymbol
impl StructuralEq for FieldSymbol
impl StructuralPartialEq for FieldSymbol
Auto Trait Implementations
impl RefUnwindSafe for FieldSymbol
impl Send for FieldSymbol
impl Sync for FieldSymbol
impl Unpin for FieldSymbol
impl UnwindSafe for FieldSymbol
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
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more