StaticDataFormatter

Trait StaticDataFormatter 

Source
pub trait StaticDataFormatter {
    type Output;

    // Required methods
    fn stdfmt_null() -> Self::Output;
    fn stdfmt_bool(value: &bool) -> Self::Output;
    fn stdfmt_string(value: &str) -> Self::Output;
    fn stdfmt_i64(value: &i64) -> Self::Output;
    fn stdfmt_f64(value: &f64) -> Self::Output;
    fn stdfmt_ip_addr(value: &IpAddr) -> Self::Output;
    fn stdfmt_datetime(value: &NaiveDateTime) -> Self::Output;
    fn stdfmt_object(value: &ObjectValue) -> Self::Output;
    fn stdfmt_array(value: &[DataField]) -> Self::Output;
    fn stdfmt_field(field: &DataField) -> Self::Output;
    fn stdfmt_record(record: &DataRecord) -> Self::Output;

    // Provided method
    fn stdfmt_value(value: &Value) -> Self::Output { ... }
}

Required Associated Types§

Required Methods§

Source

fn stdfmt_null() -> Self::Output

Source

fn stdfmt_bool(value: &bool) -> Self::Output

Source

fn stdfmt_string(value: &str) -> Self::Output

Source

fn stdfmt_i64(value: &i64) -> Self::Output

Source

fn stdfmt_f64(value: &f64) -> Self::Output

Source

fn stdfmt_ip_addr(value: &IpAddr) -> Self::Output

Source

fn stdfmt_datetime(value: &NaiveDateTime) -> Self::Output

Source

fn stdfmt_object(value: &ObjectValue) -> Self::Output

Source

fn stdfmt_array(value: &[DataField]) -> Self::Output

Source

fn stdfmt_field(field: &DataField) -> Self::Output

Source

fn stdfmt_record(record: &DataRecord) -> Self::Output

Provided Methods§

Source

fn stdfmt_value(value: &Value) -> Self::Output

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.

Implementors§