Skip to main content

Model

Trait Model 

Source
pub trait Model:
    Send
    + Sync
    + Sized
    + 'static {
    const TABLE: &'static str;
    const COLUMNS: &'static [&'static str];
    const INSERT_COLUMNS: &'static [&'static str];

    // Required methods
    fn id(&self) -> i64;
    fn from_row(row: Row<'_>) -> Result<Self>;
    fn insert_values(&self) -> Vec<Value>;
}

Required Associated Constants§

Source

const TABLE: &'static str

Source

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

Source

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

Required Methods§

Source

fn id(&self) -> i64

Source

fn from_row(row: Row<'_>) -> Result<Self>

Source

fn insert_values(&self) -> Vec<Value>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§