Skip to main content

LoadConnection

Trait LoadConnection 

Source
pub trait LoadConnection<B = DefaultLoadingMode>: Connection {
    type Cursor<'conn, 'query>: Iterator<Item = QueryResult<<Self as LoadConnection<B>>::Row<'conn, 'query>>>
       where Self: 'conn;
    type Row<'conn, 'query>: Row<'conn, Self::Backend>
       where Self: 'conn;
}
Expand description

The specific part of a Connection which actually loads data from the database

This is a separate trait to allow connection implementations to specify different loading modes via the generic parameter.

Required Associated Types§

Source

type Cursor<'conn, 'query>: Iterator<Item = QueryResult<<Self as LoadConnection<B>>::Row<'conn, 'query>>> where Self: 'conn

The cursor type returned by LoadConnection::load

Users should handle this as opaque type that implements Iterator

Source

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

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LoadConnection for SqliteConnection

Source§

type Cursor<'conn, 'query> = StatementIterator<'conn, 'query>

Source§

type Row<'conn, 'query> = SqliteRow<'conn, 'query>