pub enum RosettaDateTime {
Time(OffsetDateTime),
}Expand description
A unified date-time type that wraps either time::OffsetDateTime or
chrono::DateTime<FixedOffset> depending on the enabled backend feature.
Variants§
Time(OffsetDateTime)
Implementations§
Source§impl RosettaDateTime
impl RosettaDateTime
Source§impl RosettaDateTime
impl RosettaDateTime
Sourcepub fn add_seconds(self, secs: i64) -> Self
pub fn add_seconds(self, secs: i64) -> Self
Add (or subtract if negative) a number of seconds.
Sourcepub fn add_minutes(self, mins: i64) -> Self
pub fn add_minutes(self, mins: i64) -> Self
Add minutes.
Sourcepub fn add_months_approx(self, months: i64) -> Self
pub fn add_months_approx(self, months: i64) -> Self
Approximate month addition (adds 30 days per month).
Sourcepub fn add_years_approx(self, years: i64) -> Self
pub fn add_years_approx(self, years: i64) -> Self
Approximate year addition (adds 365 days per year).
Trait Implementations§
Source§impl Clone for RosettaDateTime
impl Clone for RosettaDateTime
Source§fn clone(&self) -> RosettaDateTime
fn clone(&self) -> RosettaDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RosettaDateTime
impl Debug for RosettaDateTime
Source§impl Display for RosettaDateTime
impl Display for RosettaDateTime
Source§impl Ord for RosettaDateTime
impl Ord for RosettaDateTime
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 PartialEq for RosettaDateTime
impl PartialEq for RosettaDateTime
Source§impl PartialOrd for RosettaDateTime
impl PartialOrd for RosettaDateTime
impl Eq for RosettaDateTime
Auto Trait Implementations§
impl Freeze for RosettaDateTime
impl RefUnwindSafe for RosettaDateTime
impl Send for RosettaDateTime
impl Sync for RosettaDateTime
impl Unpin for RosettaDateTime
impl UnsafeUnpin for RosettaDateTime
impl UnwindSafe for RosettaDateTime
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