Trait Converter

Source
pub trait Converter: Sized {
    // Required methods
    fn to_field_value(&self) -> FieldValue;
    fn to_primitive(fv: FieldValue) -> Result<Self, StructMapError>;
}

Required 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 Converter for bool

Source§

impl Converter for char

Source§

impl Converter for f32

Source§

impl Converter for f64

Source§

impl Converter for i8

Source§

impl Converter for i16

Source§

impl Converter for i32

Source§

impl Converter for i64

Source§

impl Converter for isize

Source§

impl Converter for u8

Source§

impl Converter for u16

Source§

impl Converter for u32

Source§

impl Converter for String

Source§

impl<K, V> Converter for HashMap<K, V>
where K: ToString + From<String> + Eq + Hash, V: Converter,

Source§

impl<T> Converter for Option<T>
where T: Converter,

Source§

impl<T> Converter for Vec<T>
where T: Converter,

Implementors§

Source§

impl<T> Converter for T
where T: ToHashMap,