Trait CreateEntity

Source
pub trait CreateEntity<Db>: Entity
where Db: Database,
{ // Required method fn create<Ctx>( ctx: &Ctx, tx: &mut Transaction<'_, Db>, input: Self::Create, ) -> impl Future<Output = Result<Self, Error>> + Send where Ctx: DbCtx<Db> + Sync; }

Required Methods§

Source

fn create<Ctx>( ctx: &Ctx, tx: &mut Transaction<'_, Db>, input: Self::Create, ) -> impl Future<Output = Result<Self, Error>> + Send
where Ctx: DbCtx<Db> + Sync,

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§

Source§

impl<T, Db> CreateEntity<Db> for T
where Db: Database, T: CreateQuery, for<'q> <Db as Database>::Arguments<'q>: IntoArguments<'q, Db>, for<'c> &'c mut <Db as Database>::Connection: Executor<'c, Database = Db>, <T as TableEntity>::Row: Into<T> + for<'r> FromRow<'r, Db::Row> + Send + Unpin,