ModelMeta

Trait ModelMeta 

Source
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§

Source

const TABLE_NAME: &'static str

Table name in the database.

Required Methods§

Source

fn table_def() -> TableDef

Get the table definition.

Source

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.

Implementors§