pub struct Time { /* private fields */ }Expand description
A FIX time of day, as in a UTCTimeOnly or LocalMktTime field, keeping its precision.
Equality and ordering compare the time and ignore the precision.
Implementations§
Source§impl Time
impl Time
Sourcepub const fn new(
nanos_since_midnight: i64,
precision: TimePrecision,
) -> Option<Self>
pub const fn new( nanos_since_midnight: i64, precision: TimePrecision, ) -> Option<Self>
The time nanos_since_midnight after midnight, written to precision.
None past the end of a day, which has 86,401 seconds with a leap second.
Sourcepub const fn nanos_since_midnight(&self) -> i64
pub const fn nanos_since_midnight(&self) -> i64
Nanoseconds since midnight.
Sourcepub const fn precision(&self) -> TimePrecision
pub const fn precision(&self) -> TimePrecision
The precision the value was written to, such as MILLIS for .123.
Trait Implementations§
impl Copy for Time
impl Eq for Time
Source§impl Ord for Time
impl Ord for Time
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
impl Forget for Time
impl Freeze for Time
impl Move for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnsafeUnpin for Time
impl UnwindSafe for Time
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