Enum time::format_description::FormatItem[][src]

#[non_exhaustive]
pub enum FormatItem<'a> {
    Literal(&'a [u8]),
    Component(Component),
    Compound(&'a [Self]),
}
This is supported on crate features formatting or parsing only.
Expand description

A complete description of how to format and parse a type.

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.
Literal(&'a [u8])

Bytes that are formatted as-is.

Note: If you call the format method that returns a String, these bytes will be passed through String::from_utf8_lossy.

Tuple Fields of Literal

0: &'a [u8]
Component(Component)

A minimal representation of a single non-literal item.

Tuple Fields of Component

0: Component
Compound(&'a [Self])

A series of literals or components that collectively form a partial or complete description.

Tuple Fields of Compound

0: &'a [Self]

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.