pub trait ModelMeta: Sized {
const TABLE_NAME: &'static str;
// Required methods
fn table_def() -> TableDef;
fn primary_key_field() -> &'static str;
}Expand description
Trait implemented by all FORGE models. Generated by the #[forge::model] macro.
Required Associated Constants§
Sourceconst TABLE_NAME: &'static str
const TABLE_NAME: &'static str
Table name in the database.
Required Methods§
Sourcefn primary_key_field() -> &'static str
fn primary_key_field() -> &'static str
Get the primary key field 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.