Trait timespan::Spanable

source ·
pub trait Spanable: Copy + Clone + Ord + PartialOrd + Add<Duration, Output = Self> + Sub<Duration, Output = Self> {
    // Required method
    fn signed_duration_since(self, _: Self) -> Duration;
}
Expand description

Types that implement this trait can be used inside a Span.

Required Methods§

source

fn signed_duration_since(self, _: Self) -> Duration

This is a wrapper method to the signed_duration_since method from chrono.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Spanable for NaiveDate

source§

fn signed_duration_since(self, other: Self) -> Duration

source§

impl Spanable for NaiveDateTime

source§

fn signed_duration_since(self, other: Self) -> Duration

source§

impl Spanable for NaiveTime

source§

fn signed_duration_since(self, other: Self) -> Duration

source§

impl<T: TimeZone + Copy> Spanable for DateTime<T>
where <T as TimeZone>::Offset: Copy,

source§

fn signed_duration_since(self, other: Self) -> Duration

source§

impl<T: TimeZone> Spanable for Date<T>
where <T as TimeZone>::Offset: Copy,

source§

fn signed_duration_since(self, other: Self) -> Duration

Implementors§