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.
impl<'a> Copy for Format<'a>
Auto Trait Implementations§
impl<'a> Freeze for Format<'a>
impl<'a> RefUnwindSafe for Format<'a>
impl<'a> Send for Format<'a>
impl<'a> Sync for Format<'a>
impl<'a> Unpin for Format<'a>
impl<'a> UnwindSafe for Format<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)