pub trait ModelBuilder<'a, DB>{
type Model;
// Required methods
fn insert<'e: 'a, E>(self, db: E) -> BoxFuture<'a, Result<Self::Model>>
where E: 'e + Executor<'e, Database = DB>;
fn update<'e: 'a, E>(self, db: E) -> BoxFuture<'a, Result<Self::Model>>
where E: 'e + Executor<'e, Database = DB>;
fn build(self) -> Self::Model;
}Expand description
A struct that implements ModelBuilder implements the builder pattern for a model.
Required Associated Types§
Required Methods§
fn insert<'e: 'a, E>(self, db: E) -> BoxFuture<'a, Result<Self::Model>>where
E: 'e + Executor<'e, Database = DB>,
fn update<'e: 'a, E>(self, db: E) -> BoxFuture<'a, Result<Self::Model>>where
E: 'e + Executor<'e, Database = DB>,
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.