CreateData

Trait CreateData 

Source
pub trait CreateData: Send + Sync {
    // Required methods
    fn into_fields(self) -> HashMap<String, FieldValue>;
    fn model_name() -> &'static str;
}
Expand description

Trait for types that can be used as create data.

Required Methods§

Source

fn into_fields(self) -> HashMap<String, FieldValue>

Get the field values as a map.

Source

fn model_name() -> &'static str

Get the model name.

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§