Trait Fetch

Source
pub trait Fetch {
    // Required method
    fn fetch<'a, 'life0, 'async_trait, O>(
        &'life0 self,
        query: Query<'a, O>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<O>, Error>> + Send + 'async_trait>>
       where O: 'async_trait + From<Row> + Send + Sync,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Helper Trait to implement the fetch method on Client.

Required Methods§

Source

fn fetch<'a, 'life0, 'async_trait, O>( &'life0 self, query: Query<'a, O>, ) -> Pin<Box<dyn Future<Output = Result<Vec<O>, Error>> + Send + 'async_trait>>
where O: 'async_trait + From<Row> + Send + Sync, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

fetches records from self and converts them to instances of O.

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§