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: DayMonth(Month)Month of the year.
Tuple Fields of Month
0: MonthOrdinal(Ordinal)Ordinal day of the year.
Tuple Fields of Ordinal
0: OrdinalWeekday(Weekday)Day of the week.
Tuple Fields of Weekday
0: WeekdayWeekNumber(WeekNumber)Week within the year.
Tuple Fields of WeekNumber
0: WeekNumberYear(Year)Year of the date.
Tuple Fields of Year
0: YearHour(Hour)Hour of the day.
Tuple Fields of Hour
0: HourMinute(Minute)Minute within the hour.
Tuple Fields of Minute
0: MinutePeriod(Period)AM/PM part of the time.
Tuple Fields of Period
0: PeriodSecond(Second)Second within the minute.
Tuple Fields of Second
0: SecondSubsecond(Subsecond)Subsecond within the second.
Tuple Fields of Subsecond
0: SubsecondOffsetHour(OffsetHour)Hour of the UTC offset.
Tuple Fields of OffsetHour
0: OffsetHourOffsetMinute(OffsetMinute)Minute within the hour of the UTC offset.
Tuple Fields of OffsetMinute
0: OffsetMinuteOffsetSecond(OffsetSecond)Second within the minute of the UTC offset.
Tuple Fields of OffsetSecond
0: OffsetSecondTrait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Component
impl UnwindSafe for Component
Blanket Implementations
Mutably borrows from an owned value. Read more