pub trait AsyncConnectionGatWorkaround<'conn, 'query, DB: Backend> {
type ExecuteFuture: Future<Output = QueryResult<usize>> + Send;
type LoadFuture: Future<Output = QueryResult<Self::Stream>> + Send;
type Stream: Stream<Item = QueryResult<Self::Row>> + Send;
type Row: Row<'conn, DB>;
}Expand description
This trait is a workaround to emulate GAT on stable rust
It is used to specify the return type of AsyncConnection::load
and AsyncConnection::execute which may contain lifetimes
Required Associated Types
sourcetype ExecuteFuture: Future<Output = QueryResult<usize>> + Send
type ExecuteFuture: Future<Output = QueryResult<usize>> + Send
The future returned by AsyncConnection::execute
sourcetype LoadFuture: Future<Output = QueryResult<Self::Stream>> + Send
type LoadFuture: Future<Output = QueryResult<Self::Stream>> + Send
The future returned by AsyncConnection::load
sourcetype Stream: Stream<Item = QueryResult<Self::Row>> + Send
type Stream: Stream<Item = QueryResult<Self::Row>> + Send
The inner stream returned by AsyncConnection::load
Implementors
sourceimpl<'conn, 'query> AsyncConnectionGatWorkaround<'conn, 'query, Mysql> for AsyncMysqlConnection
Available on crate feature mysql only.
impl<'conn, 'query> AsyncConnectionGatWorkaround<'conn, 'query, Mysql> for AsyncMysqlConnection
Available on crate feature
mysql only.type ExecuteFuture = Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'conn, Global>>
type LoadFuture = Pin<Box<dyn Future<Output = Result<<AsyncMysqlConnection as AsyncConnectionGatWorkaround<'conn, 'query, Mysql>>::Stream, Error>> + Send + 'conn, Global>>
type Stream = Pin<Box<dyn Stream<Item = Result<<AsyncMysqlConnection as AsyncConnectionGatWorkaround<'conn, 'query, Mysql>>::Row, Error>> + Send + 'conn, Global>>
type Row = MysqlRow
sourceimpl<'conn, 'query> AsyncConnectionGatWorkaround<'conn, 'query, Pg> for AsyncPgConnection
Available on crate feature postgres only.
impl<'conn, 'query> AsyncConnectionGatWorkaround<'conn, 'query, Pg> for AsyncPgConnection
Available on crate feature
postgres only.type LoadFuture = Pin<Box<dyn Future<Output = Result<<AsyncPgConnection as AsyncConnectionGatWorkaround<'conn, 'query, Pg>>::Stream, Error>> + Send + 'query, Global>>
type ExecuteFuture = Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'query, Global>>
type Stream = Pin<Box<dyn Stream<Item = Result<PgRow, Error>> + Send + 'static, Global>>
type Row = PgRow
sourceimpl<'conn, 'query, C, DB> AsyncConnectionGatWorkaround<'conn, 'query, DB> for Cwhere
DB: Backend,
C: DerefMut,
C::Target: AsyncConnectionGatWorkaround<'conn, 'query, DB>,
Available on crate features deadpool or bb8 or mobc only.
impl<'conn, 'query, C, DB> AsyncConnectionGatWorkaround<'conn, 'query, DB> for Cwhere
DB: Backend,
C: DerefMut,
C::Target: AsyncConnectionGatWorkaround<'conn, 'query, DB>,
Available on crate features
deadpool or bb8 or mobc only.