Model

Trait Model 

Source
pub trait Model:
    Sized
    + Send
    + Sync {
    const MODEL_NAME: &'static str;
    const TABLE_NAME: &'static str;
    const PRIMARY_KEY: &'static [&'static str];
    const COLUMNS: &'static [&'static str];
}
Expand description

A model that can be queried.

Required Associated Constants§

Source

const MODEL_NAME: &'static str

The name of the model (used for table name).

Source

const TABLE_NAME: &'static str

The name of the database table.

Source

const PRIMARY_KEY: &'static [&'static str]

The primary key column name(s).

Source

const COLUMNS: &'static [&'static str]

All column names for this model.

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§