pub struct Date(pub OffsetDateTime);
Tuple Fields§
§0: OffsetDateTime
Implementations§
Source§impl Date
impl Date
pub fn as_timestamp_ms(&self) -> i64
pub fn from_timestamp_ms(timestamp: i64) -> Result<Self, Error>
pub fn as_utc(&self) -> OffsetDateTime
pub fn from_utc(date_time: PrimitiveDateTime) -> Self
pub fn now_utc() -> Self
pub fn from_iso8601(input: &str) -> Result<Self, Error>
Methods from Deref<Target = OffsetDateTime>§
pub const UNIX_EPOCH: OffsetDateTime
Trait Implementations§
Source§impl From<OffsetDateTime> for Date
impl From<OffsetDateTime> for Date
Source§fn from(datetime: OffsetDateTime) -> Self
fn from(datetime: OffsetDateTime) -> Self
Converts to this type from the input type.
Source§impl Ord for Date
impl Ord for Date
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl Copy for Date
impl Eq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
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
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.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.