Insertable

Trait Insertable 

Source
pub trait Insertable {
    const INSERT_COLUMNS: &'static [&'static str];

    // Required method
    fn insert_values(&self) -> Vec<ParamValue>;
}
Expand description

Trait for types whose fields can be extracted for an INSERT statement. This is implemented by the #[derive(Fetchable)] macro.

Required Associated Constants§

Source

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

The columns to be used in an INSERT statement, excluding auto-generated keys.

Required Methods§

Source

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

The values of the fields corresponding to INSERT_COLUMNS.

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§