Trait Insertable

Source
pub trait Insertable: Sized {
    type Database: Database;

    // Required methods
    fn table_name() -> &'static str;
    fn insert_columns() -> Vec<&'static str>;
    fn bind_fields<'q, Q>(&'q self, q: Q) -> Q
       where Q: QueryBindExt<'q, Self::Database>;
}

Required Associated Types§

Required Methods§

Source

fn table_name() -> &'static str

Source

fn insert_columns() -> Vec<&'static str>

Source

fn bind_fields<'q, Q>(&'q self, q: Q) -> Q
where Q: QueryBindExt<'q, Self::Database>,

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.

Implementations on Foreign Types§

Source§

impl<T: Insertable + Sync> Insertable for &T

Source§

type Database = <T as Insertable>::Database

Source§

fn table_name() -> &'static str

Source§

fn insert_columns() -> Vec<&'static str>

Source§

fn bind_fields<'q, Q>(&'q self, q: Q) -> Q
where Q: QueryBindExt<'q, Self::Database>,

Implementors§