Skip to main content

AddDateTimeDiff

Trait AddDateTimeDiff 

Source
pub trait AddDateTimeDiff: DateTimeParts {
    type Output;

    // Required method
    fn add_date_time_diff(
        self,
        date_time_diff: &impl DateTimeDiff,
    ) -> Self::Output;
}
Expand description

A trait for date-time types that can apply a DateTimeDiff.

Required Associated Types§

Required Methods§

Source

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AddDateTimeDiff for DateTime

Available on crate feature jiff only.
Source§

type Output = Result<DateTime, Error>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Source§

impl AddDateTimeDiff for NaiveDateTime

Available on crate feature chrono only.
Source§

type Output = Option<NaiveDateTime>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Source§

impl AddDateTimeDiff for OffsetDateTime

Available on crate feature time only.
Source§

type Output = Option<OffsetDateTime>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Source§

impl AddDateTimeDiff for PrimitiveDateTime

Available on crate feature time only.
Source§

impl AddDateTimeDiff for UtcDateTime

Available on crate feature time only.
Source§

type Output = Option<UtcDateTime>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Source§

impl AddDateTimeDiff for Zoned

Available on crate feature jiff only.
Source§

type Output = Result<Zoned, Error>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Source§

impl<Tz> AddDateTimeDiff for DateTime<Tz>
where Tz: TimeZone, DateTime<Tz>: Ord,

Available on crate feature chrono only.
Source§

type Output = LocalResult<DateTime<Tz>>

Source§

fn add_date_time_diff(self, date_time_diff: &impl DateTimeDiff) -> Self::Output

Implementors§