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§
Sourcefn into_fields(self) -> HashMap<String, FieldValue>
fn into_fields(self) -> HashMap<String, FieldValue>
Get the field values as a map.
Sourcefn model_name() -> &'static str
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.