Trait Insert

Source
pub trait Insert
where Self: Sized + Send + Sync + 'static,
{ type Table: Table; // Required method fn insert<'a, 'c: 'a>( self, db: impl Executor<'c, Database = Db> + 'a, ) -> impl Future<Output = Result<Self::Table>> + Send + 'a; }
Expand description

A type which can be inserted as a row into the database.

Required Associated Types§

Required Methods§

Source

fn insert<'a, 'c: 'a>( self, db: impl Executor<'c, Database = Db> + 'a, ) -> impl Future<Output = Result<Self::Table>> + Send + 'a

Insert a row into the database, returning the inserted row.

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§