Struct irox_time::datetime::UTCDateTime
source · pub struct UTCDateTime { /* private fields */ }Expand description
Represents a Gregorian Date and Time in UTC
Implementations§
source§impl UTCDateTime
impl UTCDateTime
sourcepub fn new(date: Date, time: Time) -> UTCDateTime
pub fn new(date: Date, time: Time) -> UTCDateTime
New UTC Date and Time
sourcepub fn now() -> UTCDateTime
pub fn now() -> UTCDateTime
Returns the current instant in time as reported by the local system clock.
pub fn format<T: Format<Item = UTCDateTime>>(&self, format: &T) -> String
Trait Implementations§
source§impl Clone for UTCDateTime
impl Clone for UTCDateTime
source§fn clone(&self) -> UTCDateTime
fn clone(&self) -> UTCDateTime
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 UTCDateTime
impl Debug for UTCDateTime
source§impl Default for UTCDateTime
impl Default for UTCDateTime
source§fn default() -> UTCDateTime
fn default() -> UTCDateTime
Returns the “default value” for a type. Read more
source§impl Display for UTCDateTime
impl Display for UTCDateTime
source§impl From<&Timestamp<UnixEpoch>> for UTCDateTime
impl From<&Timestamp<UnixEpoch>> for UTCDateTime
source§fn from(value: &UnixTimestamp) -> Self
fn from(value: &UnixTimestamp) -> Self
Converts to this type from the input type.
source§impl From<&UTCDateTime> for JulianDate
impl From<&UTCDateTime> for JulianDate
source§fn from(value: &UTCDateTime) -> Self
fn from(value: &UTCDateTime) -> Self
Converts to this type from the input type.
source§impl From<&UTCDateTime> for UnixTimestamp
impl From<&UTCDateTime> for UnixTimestamp
source§fn from(value: &UTCDateTime) -> Self
fn from(value: &UTCDateTime) -> Self
Converts to this type from the input type.
source§impl From<Timestamp<UnixEpoch>> for UTCDateTime
impl From<Timestamp<UnixEpoch>> for UTCDateTime
source§fn from(value: UnixTimestamp) -> Self
fn from(value: UnixTimestamp) -> Self
Converts to this type from the input type.
source§impl From<UTCDateTime> for JulianDate
impl From<UTCDateTime> for JulianDate
source§fn from(value: UTCDateTime) -> Self
fn from(value: UTCDateTime) -> Self
Converts to this type from the input type.
source§impl From<UTCDateTime> for UnixTimestamp
impl From<UTCDateTime> for UnixTimestamp
source§fn from(value: UTCDateTime) -> Self
fn from(value: UTCDateTime) -> Self
Converts to this type from the input type.
source§impl Ord for UTCDateTime
impl Ord for UTCDateTime
source§fn cmp(&self, other: &UTCDateTime) -> Ordering
fn cmp(&self, other: &UTCDateTime) -> Ordering
1.21.0 · 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
source§impl PartialEq for UTCDateTime
impl PartialEq for UTCDateTime
source§fn eq(&self, other: &UTCDateTime) -> bool
fn eq(&self, other: &UTCDateTime) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for UTCDateTime
impl PartialOrd for UTCDateTime
source§fn partial_cmp(&self, other: &UTCDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &UTCDateTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Sub<&UTCDateTime> for UTCDateTime
impl Sub<&UTCDateTime> for UTCDateTime
source§impl Sub for UTCDateTime
impl Sub for UTCDateTime
impl Copy for UTCDateTime
impl Eq for UTCDateTime
impl StructuralEq for UTCDateTime
impl StructuralPartialEq for UTCDateTime
Auto Trait Implementations§
impl RefUnwindSafe for UTCDateTime
impl Send for UTCDateTime
impl Sync for UTCDateTime
impl Unpin for UTCDateTime
impl UnwindSafe for UTCDateTime
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