pub trait TableSchema {
// Required methods
fn table_name() -> &'static str;
fn columns() -> Vec<ColumnDef>;
fn primary_key() -> &'static [&'static str];
}Expand description
Trait for types that have a table schema
Required Methods§
Sourcefn table_name() -> &'static str
fn table_name() -> &'static str
Get the table name
Sourcefn primary_key() -> &'static [&'static str]
fn primary_key() -> &'static [&'static str]
Get primary key 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.