sqlite_watcher::connection

Trait SqlConnectionAsync

Source
pub trait SqlConnectionAsync: SqlExecutorAsync {
    // Required method
    fn sql_transaction(
        &mut self,
    ) -> impl Future<Output = Result<impl SqlTransactionAsync<Error = Self::Error> + '_, Self::Error>> + Send;
}
Expand description

Defines an implementation of a sqlite connection from which we can create an crate::connection::SqlTransaction.

Required Methods§

Source

fn sql_transaction( &mut self, ) -> impl Future<Output = Result<impl SqlTransactionAsync<Error = Self::Error> + '_, Self::Error>> + Send

Create a new transaction for the connection.

§Errors

Should return an error if the transaction can’t be created.

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§