pub trait InsertModel:
Sized
+ Send
+ 'static {
type Schema: SchemaAccess;
type Values: InsertValueSet;
// Required methods
fn model_name() -> &'static str;
fn returning_fields() -> &'static [&'static str];
fn from_row(row: &PgRow, prefix: &str) -> Result<Self, Error>;
}Expand description
Runtime contract implemented by insert result models.
Required Associated Types§
type Schema: SchemaAccess
type Values: InsertValueSet
Required Methods§
Sourcefn model_name() -> &'static str
fn model_name() -> &'static str
Schema model name being inserted into.
Sourcefn returning_fields() -> &'static [&'static str]
fn returning_fields() -> &'static [&'static str]
Scalar fields returned by the insert statement.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".