Trait DateConverter

Source
pub trait DateConverter {
    // Required methods
    fn to_date(&self, tz: Tz) -> ValueRef<'static>;
    fn get_stamp(source: Value) -> Self;
    fn date_type() -> SqlType;

    // Provided method
    fn get_days(date: NaiveDate) -> u16 { ... }
}

Required Methods§

Source

fn to_date(&self, tz: Tz) -> ValueRef<'static>

Source

fn get_stamp(source: Value) -> Self

Source

fn date_type() -> SqlType

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DateConverter for u16

Source§

fn to_date(&self, _: Tz) -> ValueRef<'static>

Source§

fn get_stamp(source: Value) -> Self

Source§

fn date_type() -> SqlType

Source§

impl DateConverter for u32

Source§

fn to_date(&self, tz: Tz) -> ValueRef<'static>

Source§

fn get_stamp(source: Value) -> Self

Source§

fn date_type() -> SqlType

Implementors§