Trait AsyncConnection

Source
pub trait AsyncConnection<Conn>: AsyncSimpleConnection<Conn>
where Conn: 'static + Connection,
{ // Required methods fn run<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>> where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn transaction<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>> where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; }

Required Methods§

Source

fn run<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>>
where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn transaction<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>>
where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

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.

Implementations on Foreign Types§

Source§

impl<Conn> AsyncConnection<Conn> for Pool<ConnectionManager<Conn>>
where Conn: 'static + Connection,

Source§

fn run<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>>
where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source§

fn transaction<'life0, 'async_trait, R, Func>( &'life0 self, f: Func, ) -> Pin<Box<dyn Future<Output = AsyncResult<R>> + Send + 'async_trait>>
where R: 'static + Send + 'async_trait, Func: 'static + FnOnce(&Conn) -> QueryResult<R> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Implementors§