pub struct FormatOptions {
pub subsecond_digits: u8,
pub precision: FormatPrecision,
pub include_zulu: bool,
}Expand description
Format options for ISO 8601 / RFC 3339 output.
Fields§
§subsecond_digits: u8Number of subsecond digits to emit (0..=9). Values above 9 are clamped to 9 because tempoch’s exact storage is 1 ns.
precision: FormatPrecisionRounding policy when truncating below the requested precision.
include_zulu: boolWhen true, emit the trailing Z (RFC 3339); when false, emit no
timezone suffix (bare ISO 8601 naive datetime). UTC offsets other
than Z are not supported because the underlying scale is UTC.
Implementations§
Source§impl FormatOptions
impl FormatOptions
Sourcepub const fn milliseconds() -> Self
pub const fn milliseconds() -> Self
Milliseconds resolution (3 fractional digits).
Sourcepub const fn microseconds() -> Self
pub const fn microseconds() -> Self
Microseconds resolution (6 fractional digits).
Sourcepub const fn nanoseconds() -> Self
pub const fn nanoseconds() -> Self
Nanoseconds resolution (9 fractional digits).
Trait Implementations§
Source§impl Clone for FormatOptions
impl Clone for FormatOptions
Source§fn clone(&self) -> FormatOptions
fn clone(&self) -> FormatOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatOptions
impl Debug for FormatOptions
Source§impl Default for FormatOptions
impl Default for FormatOptions
Source§impl PartialEq for FormatOptions
impl PartialEq for FormatOptions
Source§fn eq(&self, other: &FormatOptions) -> bool
fn eq(&self, other: &FormatOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FormatOptions
impl Eq for FormatOptions
impl StructuralPartialEq for FormatOptions
Auto Trait Implementations§
impl Freeze for FormatOptions
impl RefUnwindSafe for FormatOptions
impl Send for FormatOptions
impl Sync for FormatOptions
impl Unpin for FormatOptions
impl UnsafeUnpin for FormatOptions
impl UnwindSafe for FormatOptions
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.