ToMap

Trait ToMap 

Source
pub trait ToMap: Default {
    // Required methods
    fn to_stringmap(structure: Self) -> StringMap;
    fn to_genericmap(structure: Self) -> GenericMap;
}

Required Methods§

Source

fn to_stringmap(structure: Self) -> StringMap

Generates a StringMap where value types are all casted to strings. Constraints: one-way, will need additional work to re-convert to struct.

Source

fn to_genericmap(structure: Self) -> GenericMap

Generates a GenericMap where value types are all encapsulated under a sum type. Constraints: currently only supports primitive types for genericized values.

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§