Enum time::format_description::Component [−][src]
#[non_exhaustive]
pub enum Component {
Show 14 variants
Day(Day),
Month(Month),
Ordinal(Ordinal),
Weekday(Weekday),
WeekNumber(WeekNumber),
Year(Year),
Hour(Hour),
Minute(Minute),
Period(Period),
Second(Second),
Subsecond(Subsecond),
OffsetHour(OffsetHour),
OffsetMinute(OffsetMinute),
OffsetSecond(OffsetSecond),
}
This is supported on crate features
formatting
or parsing
only.Expand description
A component of a larger format description.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Day(Day)
Day of the month.
Tuple Fields of Day
0: Day
Month(Month)
Month of the year.
Tuple Fields of Month
0: Month
Ordinal(Ordinal)
Ordinal day of the year.
Tuple Fields of Ordinal
0: Ordinal
Weekday(Weekday)
Day of the week.
Tuple Fields of Weekday
0: Weekday
WeekNumber(WeekNumber)
Week within the year.
Tuple Fields of WeekNumber
0: WeekNumber
Year(Year)
Year of the date.
Tuple Fields of Year
0: Year
Hour(Hour)
Hour of the day.
Tuple Fields of Hour
0: Hour
Minute(Minute)
Minute within the hour.
Tuple Fields of Minute
0: Minute
Period(Period)
AM/PM part of the time.
Tuple Fields of Period
0: Period
Second(Second)
Second within the minute.
Tuple Fields of Second
0: Second
Subsecond(Subsecond)
Subsecond within the second.
Tuple Fields of Subsecond
0: Subsecond
OffsetHour(OffsetHour)
Hour of the UTC offset.
Tuple Fields of OffsetHour
0: OffsetHour
OffsetMinute(OffsetMinute)
Minute within the hour of the UTC offset.
Tuple Fields of OffsetMinute
0: OffsetMinute
OffsetSecond(OffsetSecond)
Second within the minute of the UTC offset.
Tuple Fields of OffsetSecond
0: OffsetSecond
Trait Implementations
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Component
impl UnwindSafe for Component
Blanket Implementations
Mutably borrows from an owned value. Read more