Enum time::format_description::well_known::iso8601::TimePrecision
source · pub enum TimePrecision {
Hour {
decimal_digits: Option<NonZeroU8>,
},
Minute {
decimal_digits: Option<NonZeroU8>,
},
Second {
decimal_digits: Option<NonZeroU8>,
},
}
Expand description
The precision and number of decimal digits present for the time.
Variants§
Hour
Format the hour only. Minutes, seconds, and nanoseconds will be represented with the specified number of decimal digits, if any.
Minute
Format the hour and minute. Seconds and nanoseconds will be represented with the specified number of decimal digits, if any.
Second
Format the hour, minute, and second. Nanoseconds will be represented with the specified number of decimal digits, if any.
Trait Implementations§
source§impl Clone for TimePrecision
impl Clone for TimePrecision
source§fn clone(&self) -> TimePrecision
fn clone(&self) -> TimePrecision
Returns a copy of the value. Read more
1.0.0 · 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 TimePrecision
impl Debug for TimePrecision
source§impl PartialEq for TimePrecision
impl PartialEq for TimePrecision
source§fn eq(&self, other: &TimePrecision) -> bool
fn eq(&self, other: &TimePrecision) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TimePrecision
impl Eq for TimePrecision
impl StructuralPartialEq for TimePrecision
Auto Trait Implementations§
impl Freeze for TimePrecision
impl RefUnwindSafe for TimePrecision
impl Send for TimePrecision
impl Sync for TimePrecision
impl Unpin for TimePrecision
impl UnwindSafe for TimePrecision
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