Trait diesel::connection::ConnectionGatWorkaround

source ·
pub trait ConnectionGatWorkaround<'conn, 'query, DB: Backend, B = DefaultLoadingMode> {
    type Cursor: Iterator<Item = QueryResult<Self::Row>>;
    type Row: Row<'conn, DB>;
}
Expand description

This trait describes which cursor type is used by a given connection implementation. This trait is only useful in combination with Connection.

Implementation wise this is a workaround for GAT’s

Required Associated Types§

source

type Cursor: Iterator<Item = QueryResult<Self::Row>>

The cursor type returned by LoadConnection::load

Users should handle this as opaque type that implements Iterator

source

type Row: Row<'conn, DB>

The row type used as Iterator::Item for the iterator implementation of ConnectionGatWorkaround::Cursor

Implementors§

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Pg> for PgConnection

§

type Cursor = Cursor

§

type Row = PgRow

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Pg, PgRowByRowLoadingMode> for PgConnection

§

type Cursor = RowByRowCursor<'conn>

§

type Row = PgRow