Trait timespan::Formatable

source ·
pub trait Formatable: Display {
    // Required method
    fn format<'a>(&self, _: &'a str) -> DelayedFormat<StrftimeItems<'a>>;
}
Expand description

Spanable types that are formatable can be used to serialize a given span to a string.

Required Methods§

source

fn format<'a>(&self, _: &'a str) -> DelayedFormat<StrftimeItems<'a>>

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

Implementations on Foreign Types§

source§

impl Formatable for NaiveDate

source§

fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>

source§

impl Formatable for NaiveDateTime

source§

fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>

source§

impl Formatable for NaiveTime

source§

fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>

source§

impl<T: TimeZone> Formatable for Date<T>
where <T as TimeZone>::Offset: Display,

source§

fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>

source§

impl<T: TimeZone> Formatable for DateTime<T>
where <T as TimeZone>::Offset: Display,

source§

fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>

Implementors§