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.
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
.
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for FormatItem<'a>
impl<'a> Send for FormatItem<'a>
impl<'a> Sync for FormatItem<'a>
impl<'a> Unpin for FormatItem<'a>
impl<'a> UnwindSafe for FormatItem<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more