pub struct Date(pub OffsetDateTime);Tuple Fields§
§0: OffsetDateTimeImplementations§
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.