Trait Schema

Source
pub trait Schema {
    type Id: Send;

    // Required methods
    fn table_name() -> &'static str;
    fn id(&self) -> Self::Id;
    fn id_column() -> &'static str;
    fn columns() -> &'static [&'static str];
}

Required Associated Types§

Required Methods§

Source

fn table_name() -> &'static str

Source

fn id(&self) -> Self::Id

Returns the id of the current instance.

Source

fn id_column() -> &'static str

Returns the column name of the primary key.

Source

fn columns() -> &'static [&'static str]

Returns an array of column names.

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§