AsyncConnectionCore

Trait AsyncConnectionCore 

Source
pub trait AsyncConnectionCore: SimpleAsyncConnection + Send {
    type ExecuteFuture<'conn, 'query>: Future<Output = QueryResult<usize>> + Send;
    type LoadFuture<'conn, 'query>: Future<Output = QueryResult<Self::Stream<'conn, 'query>>> + Send;
    type Stream<'conn, 'query>: Stream<Item = QueryResult<Self::Row<'conn, 'query>>> + Send;
    type Row<'conn, 'query>: Row<'conn, Self::Backend>;
    type Backend: Backend;
}
Expand description

Core trait for an async database connection

Required Associated Types§

Source

type ExecuteFuture<'conn, 'query>: Future<Output = QueryResult<usize>> + Send

The future returned by AsyncConnection::execute

Source

type LoadFuture<'conn, 'query>: Future<Output = QueryResult<Self::Stream<'conn, 'query>>> + Send

The future returned by AsyncConnection::load

Source

type Stream<'conn, 'query>: Stream<Item = QueryResult<Self::Row<'conn, 'query>>> + Send

The inner stream returned by AsyncConnection::load

Source

type Row<'conn, 'query>: Row<'conn, Self::Backend>

The row type used by the stream returned by AsyncConnection::load

Source

type Backend: Backend

The backend this type connects to

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 AsyncConnectionCore for &AsyncPgConnection

Available on crate feature postgres only.
Source§

type LoadFuture<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::LoadFuture<'conn, 'query>

Source§

type ExecuteFuture<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>

Source§

type Stream<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::Stream<'conn, 'query>

Source§

type Row<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::Row<'conn, 'query>

Source§

type Backend = <AsyncPgConnection as AsyncConnectionCore>::Backend

Source§

impl AsyncConnectionCore for AsyncMysqlConnection

Available on crate feature mysql only.
Source§

type ExecuteFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'conn>>

Source§

type LoadFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<<AsyncMysqlConnection as AsyncConnectionCore>::Stream<'conn, 'query>, Error>> + Send + 'conn>>

Source§

type Stream<'conn, 'query> = Pin<Box<dyn Stream<Item = Result<<AsyncMysqlConnection as AsyncConnectionCore>::Row<'conn, 'query>, Error>> + Send + 'conn>>

Source§

type Row<'conn, 'query> = MysqlRow

Source§

type Backend = Mysql

Source§

impl AsyncConnectionCore for AsyncPgConnection

Available on crate feature postgres only.
Source§

type LoadFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<<AsyncPgConnection as AsyncConnectionCore>::Stream<'conn, 'query>, Error>> + Send + 'query>>

Source§

type ExecuteFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'query>>

Source§

type Stream<'conn, 'query> = Pin<Box<dyn Stream<Item = Result<PgRow, Error>> + Send>>

Source§

type Row<'conn, 'query> = PgRow

Source§

type Backend = Pg

Source§

impl<C> AsyncConnectionCore for C

Source§

type ExecuteFuture<'conn, 'query> = <<C as Deref>::Target as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>

Source§

type LoadFuture<'conn, 'query> = <<C as Deref>::Target as AsyncConnectionCore>::LoadFuture<'conn, 'query>

Source§

type Stream<'conn, 'query> = <<C as Deref>::Target as AsyncConnectionCore>::Stream<'conn, 'query>

Source§

type Row<'conn, 'query> = <<C as Deref>::Target as AsyncConnectionCore>::Row<'conn, 'query>

Source§

type Backend = <<C as Deref>::Target as AsyncConnectionCore>::Backend