pub struct OffsetDateTime { /* private fields */ }Implementations§
Source§impl OffsetDateTime
impl OffsetDateTime
pub const fn from_unix_millis(unix_millis: i64, offset: UtcOffset) -> Self
pub fn from_local(local: CivilDateTime, offset: UtcOffset) -> Option<Self>
pub const fn timestamp_millis(self) -> i64
pub const fn timestamp_seconds(self) -> i64
pub const fn offset(self) -> UtcOffset
pub fn date(self) -> CivilDate
pub fn year(self) -> i32
pub fn month(self) -> u32
pub fn month0(self) -> u32
pub fn day(self) -> u32
pub fn day0(self) -> u32
pub fn ordinal(self) -> u32
pub fn iso_week(self) -> IsoWeek
pub fn weekday(self) -> Weekday
pub fn hour(self) -> u32
pub fn minute(self) -> u32
pub fn second(self) -> u32
pub fn millisecond(self) -> u32
pub fn local_datetime(self) -> CivilDateTime
pub fn utc_datetime(self) -> CivilDateTime
pub const fn to_offset(self, offset: UtcOffset) -> Self
pub fn checked_add_millis(self, milliseconds: i64) -> Option<Self>
Trait Implementations§
Source§impl Clone for OffsetDateTime
impl Clone for OffsetDateTime
impl Copy for OffsetDateTime
Source§impl Debug for OffsetDateTime
impl Debug for OffsetDateTime
impl Eq for OffsetDateTime
Source§impl Ord for OffsetDateTime
impl Ord for OffsetDateTime
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for OffsetDateTime
impl PartialEq for OffsetDateTime
Source§impl PartialOrd for OffsetDateTime
impl PartialOrd for OffsetDateTime
Auto Trait Implementations§
impl Freeze for OffsetDateTime
impl RefUnwindSafe for OffsetDateTime
impl Send for OffsetDateTime
impl Sync for OffsetDateTime
impl Unpin for OffsetDateTime
impl UnsafeUnpin for OffsetDateTime
impl UnwindSafe for OffsetDateTime
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.