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§
Sourcetype ExecuteFuture<'conn, 'query>: Future<Output = QueryResult<usize>> + Send
type ExecuteFuture<'conn, 'query>: Future<Output = QueryResult<usize>> + Send
The future returned by AsyncConnection::execute
Sourcetype LoadFuture<'conn, 'query>: Future<Output = QueryResult<Self::Stream<'conn, 'query>>> + Send
type LoadFuture<'conn, 'query>: Future<Output = QueryResult<Self::Stream<'conn, 'query>>> + Send
The future returned by AsyncConnection::load
Sourcetype Stream<'conn, 'query>: Stream<Item = QueryResult<Self::Row<'conn, 'query>>> + Send
type Stream<'conn, 'query>: Stream<Item = QueryResult<Self::Row<'conn, 'query>>> + Send
The inner stream returned by AsyncConnection::load
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.
impl AsyncConnectionCore for &AsyncPgConnection
Available on crate feature
postgres
only.type LoadFuture<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::LoadFuture<'conn, 'query>
type ExecuteFuture<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
type Stream<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::Stream<'conn, 'query>
type Row<'conn, 'query> = <AsyncPgConnection as AsyncConnectionCore>::Row<'conn, 'query>
type Backend = <AsyncPgConnection as AsyncConnectionCore>::Backend
Source§impl AsyncConnectionCore for AsyncMysqlConnection
Available on crate feature mysql
only.
impl AsyncConnectionCore for AsyncMysqlConnection
Available on crate feature
mysql
only.type ExecuteFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'conn>>
type LoadFuture<'conn, 'query> = Pin<Box<dyn Future<Output = Result<<AsyncMysqlConnection as AsyncConnectionCore>::Stream<'conn, 'query>, Error>> + Send + 'conn>>
type Stream<'conn, 'query> = Pin<Box<dyn Stream<Item = Result<<AsyncMysqlConnection as AsyncConnectionCore>::Row<'conn, 'query>, Error>> + Send + 'conn>>
type Row<'conn, 'query> = MysqlRow
type Backend = Mysql
Source§impl AsyncConnectionCore for AsyncPgConnection
Available on crate feature postgres
only.
impl AsyncConnectionCore for AsyncPgConnection
Available on crate feature
postgres
only.