[go: up one dir, main page]

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 of the month.

Tuple Fields of Day

0: Day
Month

Month of the year.

Tuple Fields of Month

0: Month
Ordinal

Ordinal day of the year.

Tuple Fields of Ordinal

0: Ordinal
Weekday

Day of the week.

Tuple Fields of Weekday

0: Weekday
WeekNumber

Week within the year.

Tuple Fields of WeekNumber

0: WeekNumber
Year

Year of the date.

Tuple Fields of Year

0: Year
Hour

Hour of the day.

Tuple Fields of Hour

0: Hour
Minute

Minute within the hour.

Tuple Fields of Minute

0: Minute
Period

AM/PM part of the time.

Tuple Fields of Period

0: Period
Second

Second within the minute.

Tuple Fields of Second

0: Second
Subsecond

Subsecond within the second.

Tuple Fields of Subsecond

0: Subsecond
OffsetHour

Hour of the UTC offset.

Tuple Fields of OffsetHour

0: OffsetHour
OffsetMinute

Minute within the hour of the UTC offset.

Tuple Fields of OffsetMinute

0: OffsetMinute
OffsetSecond

Second within the minute of the UTC offset.

Tuple Fields of OffsetSecond

0: OffsetSecond

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.