Formattable

Trait Formattable 

Source
pub trait Formattable: Display {
    // Required method
    fn may_need_escaping() -> bool;

    // Provided method
    fn fmt_csv(&self, f: &mut String) -> Result { ... }
}

Required Methods§

Source

fn may_need_escaping() -> bool

Returns true if this type might need escaping

Provided Methods§

Source

fn fmt_csv(&self, f: &mut String) -> Result

Write the value in CSV format (with escaping if needed)

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 Formattable for bool

Source§

impl Formattable for f32

Source§

impl Formattable for f64

Source§

impl Formattable for i8

Source§

impl Formattable for i16

Source§

impl Formattable for i32

Source§

impl Formattable for i64

Source§

impl Formattable for i128

Source§

impl Formattable for isize

Source§

impl Formattable for u8

Source§

impl Formattable for u16

Source§

impl Formattable for u32

Source§

impl Formattable for u64

Source§

impl Formattable for u128

Source§

impl Formattable for usize

Implementors§