pub struct DateTime(/* private fields */);Expand description
UTC datetime represented as epoch milliseconds.
Implementations§
Source§impl DateTime
impl DateTime
Sourcepub fn from_millis(millis: i64) -> DateTime
pub fn from_millis(millis: i64) -> DateTime
Create from UTC epoch milliseconds.
Sourcepub fn parse_rfc3339(input: &str) -> Result<DateTime, ParseError>
pub fn parse_rfc3339(input: &str) -> Result<DateTime, ParseError>
Parse an RFC3339 datetime string and normalize it to UTC.
Sourcepub fn to_rfc3339(self) -> Option<String>
pub fn to_rfc3339(self) -> Option<String>
Format as canonical RFC3339 UTC.
Trait Implementations§
impl Copy for DateTime
impl Eq for DateTime
Source§impl From<DateTime> for PropertyValue
impl From<DateTime> for PropertyValue
Source§fn from(value: DateTime) -> PropertyValue
fn from(value: DateTime) -> PropertyValue
Converts to this type from the input type.
Source§impl Ord for DateTime
impl Ord for DateTime
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
Source§impl PartialOrd for DateTime
impl PartialOrd for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.