Enum icu::datetime::fields::FieldSymbol
source · pub enum FieldSymbol {
Era,
Year(Year),
Month(Month),
Week(Week),
Day(Day),
Weekday(Weekday),
DayPeriod(DayPeriod),
Hour(Hour),
Minute,
Second(Second),
TimeZone(TimeZone),
DecimalSecond(DecimalSecond),
}
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 integer within a minute or milliseconds within a day.
TimeZone(TimeZone)
Time zone as a name, a zone ID, or a ISO 8601 numerical offset.
DecimalSecond(DecimalSecond)
Seconds with fractional digits. If seconds are an integer,
FieldSymbol::Second
is used.
Trait Implementations§
source§impl AsULE for FieldSymbol
impl AsULE for FieldSymbol
source§type ULE = FieldSymbolULE
type ULE = FieldSymbolULE
Self
. Read moresource§fn to_unaligned(self) -> <FieldSymbol as AsULE>::ULE
fn to_unaligned(self) -> <FieldSymbol as AsULE>::ULE
source§fn from_unaligned(unaligned: <FieldSymbol as AsULE>::ULE) -> FieldSymbol
fn from_unaligned(unaligned: <FieldSymbol as AsULE>::ULE) -> FieldSymbol
source§impl Bake for FieldSymbol
impl Bake for FieldSymbol
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl BakeSize for FieldSymbol
impl BakeSize for FieldSymbol
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
source§impl Clone for FieldSymbol
impl Clone for FieldSymbol
source§fn clone(&self) -> FieldSymbol
fn clone(&self) -> FieldSymbol
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldSymbol
impl Debug for FieldSymbol
source§impl<'de> Deserialize<'de> for FieldSymbol
impl<'de> Deserialize<'de> for FieldSymbol
source§fn 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>,
source§impl From<Day> for FieldSymbol
impl From<Day> for FieldSymbol
source§fn from(input: Day) -> FieldSymbol
fn from(input: Day) -> FieldSymbol
source§impl From<DayPeriod> for FieldSymbol
impl From<DayPeriod> for FieldSymbol
source§fn from(input: DayPeriod) -> FieldSymbol
fn from(input: DayPeriod) -> FieldSymbol
source§impl From<DecimalSecond> for FieldSymbol
impl From<DecimalSecond> for FieldSymbol
source§fn from(input: DecimalSecond) -> FieldSymbol
fn from(input: DecimalSecond) -> FieldSymbol
source§impl From<Hour> for FieldSymbol
impl From<Hour> for FieldSymbol
source§fn from(input: Hour) -> FieldSymbol
fn from(input: Hour) -> FieldSymbol
source§impl From<Month> for FieldSymbol
impl From<Month> for FieldSymbol
source§fn from(input: Month) -> FieldSymbol
fn from(input: Month) -> FieldSymbol
source§impl From<Second> for FieldSymbol
impl From<Second> for FieldSymbol
source§fn from(input: Second) -> FieldSymbol
fn from(input: Second) -> FieldSymbol
source§impl From<TimeZone> for FieldSymbol
impl From<TimeZone> for FieldSymbol
source§fn from(input: TimeZone) -> FieldSymbol
fn from(input: TimeZone) -> FieldSymbol
source§impl From<Week> for FieldSymbol
impl From<Week> for FieldSymbol
source§fn from(input: Week) -> FieldSymbol
fn from(input: Week) -> FieldSymbol
source§impl From<Weekday> for FieldSymbol
impl From<Weekday> for FieldSymbol
source§fn from(input: Weekday) -> FieldSymbol
fn from(input: Weekday) -> FieldSymbol
source§impl From<Year> for FieldSymbol
impl From<Year> for FieldSymbol
source§fn from(input: Year) -> FieldSymbol
fn from(input: Year) -> FieldSymbol
source§impl Ord for FieldSymbol
impl Ord for FieldSymbol
source§fn cmp(&self, other: &FieldSymbol) -> Ordering
fn cmp(&self, other: &FieldSymbol) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for FieldSymbol
impl PartialEq for FieldSymbol
source§impl PartialOrd for FieldSymbol
impl PartialOrd for FieldSymbol
source§impl Serialize for FieldSymbol
impl Serialize for FieldSymbol
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,
source§impl TryFrom<char> for FieldSymbol
impl TryFrom<char> for FieldSymbol
source§type Error = SymbolError
type Error = SymbolError
source§fn try_from(
ch: char,
) -> Result<FieldSymbol, <FieldSymbol as TryFrom<char>>::Error>
fn try_from( ch: char, ) -> Result<FieldSymbol, <FieldSymbol as TryFrom<char>>::Error>
impl Copy for FieldSymbol
impl Eq for FieldSymbol
impl StructuralPartialEq for FieldSymbol
Auto Trait Implementations§
impl Freeze for FieldSymbol
impl RefUnwindSafe for FieldSymbol
impl Send for FieldSymbol
impl Sync for FieldSymbol
impl Unpin for FieldSymbol
impl UnwindSafe for FieldSymbol
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
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>
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