pub enum Format<'a> {
Custom(&'a [FormatItem<'a>]),
Unix,
Raw,
}
Expand description
Various ways to describe a time format.
Variants§
Custom(&'a [FormatItem<'a>])
A custom format typically defined with the format_description
macro.
Unix
The seconds since 1970, also known as unix epoch, like 1660874655
.
Raw
The seconds since 1970, followed by the offset, like 1660874655 +0800
Trait Implementations§
source§impl<'a> From<&'a [BorrowedFormatItem<'a>]> for Format<'a>
impl<'a> From<&'a [BorrowedFormatItem<'a>]> for Format<'a>
source§fn from(f: &'a [FormatItem<'a>]) -> Self
fn from(f: &'a [FormatItem<'a>]) -> Self
Converts to this type from the input type.