pub trait Insert<DB>{
type Model;
// Required method
fn insert<'e, A>(self, conn: A) -> BoxFuture<'e, Result<Self::Model>>
where A: 'e + Send + Acquire<'e, Database = DB>;
}Expand description
A struct that is Insert is expected to have same fields as the model, excluding fields
that have sane defaults at the database level. Concretely, if you have a Person struct:
#[derive(ormlite::Model)]
struct Person {
id: i32,
name: String,
age: i32,
}
Then the Insert struct looks like:
struct InsertPerson {
name: String,
age: i32,
}
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".