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.

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

Variants (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.

Component(Component)

A minimal representation of a single non-literal item.

Compound(&'a [Self])

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

Trait Implementations

impl<'a> Clone for FormatItem<'a>[src]

impl Debug for FormatItem<'_>[src]

impl<'a> Eq for FormatItem<'a>[src]

impl Formattable for FormatItem<'_>[src]

This is supported on crate feature formatting only.

impl Parsable for FormatItem<'_>[src]

This is supported on crate feature parsing only.

impl<'a> PartialEq<FormatItem<'a>> for FormatItem<'a>[src]

impl<'a> StructuralEq for FormatItem<'a>[src]

impl<'a> StructuralPartialEq for FormatItem<'a>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.