Trait 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§