pub struct DateTime(/* private fields */);Implementations§
Source§impl DateTime
impl DateTime
pub fn new(date: Date, time: Time) -> Self
pub const fn from_unix_timestamp( timestamp: i64, timezone: Timezone, ) -> Result<Self>
pub const fn to_timezone(self, timezone: Timezone) -> Result<Self>
pub fn now(timezone: Timezone) -> Result<Self>
pub const fn into_parts(self) -> (Date, Time)
pub const fn hour(&self) -> u8
pub const fn minute(&self) -> u8
pub const fn second(&self) -> u8
pub const fn millisecond(&self) -> u16
pub const fn timezone(&self) -> Timezone
pub const fn year(&self) -> i32
pub const fn month(&self) -> Month
pub const fn day(&self) -> u8
pub const fn weekday(&self) -> Weekday
pub const fn unix_timestamp(&self) -> i64
Trait Implementations§
impl Copy for DateTime
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.