Skip to main content

TableSchema

Trait TableSchema 

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

Source

fn table_name() -> &'static str

Get the table name

Source

fn columns() -> Vec<ColumnDef>

Get column definitions

Source

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.

Implementors§