pub enum TimePrecision {
Hour {
decimal_digits: Option<NonZeroU8>,
},
Minute {
decimal_digits: Option<NonZeroU8>,
},
Second {
decimal_digits: Option<NonZeroU8>,
},
}
Available on crate features
formatting
or parsing
only.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 Eq for TimePrecision
impl Eq for TimePrecision
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
Source§impl PartialEq for TimePrecision
impl PartialEq for TimePrecision
impl Copy 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