Skip to main content

InstrumentedFetch

Trait InstrumentedFetch 

Source
pub trait InstrumentedFetch<'q, DB: Database>: Sized + Send {
    type Output: Send;

    // Required methods
    fn fetch_one_instrumented<P>(
        self,
        pool: &P,
        sql: impl AsRef<str> + Send,
    ) -> impl Future<Output = Result<Self::Output, Error>> + Send
       where P: InstrumentedPool<Database = DB> + Send + Sync,
             for<'c> &'c P: Executor<'c, Database = DB>;
    fn fetch_optional_instrumented<P>(
        self,
        pool: &P,
        sql: impl AsRef<str> + Send,
    ) -> impl Future<Output = Result<Option<Self::Output>, Error>> + Send
       where P: InstrumentedPool<Database = DB> + Send + Sync,
             for<'c> &'c P: Executor<'c, Database = DB>;
    fn fetch_all_instrumented<P>(
        self,
        pool: &P,
        sql: impl AsRef<str> + Send,
    ) -> impl Future<Output = Result<Vec<Self::Output>, Error>> + Send
       where P: InstrumentedPool<Database = DB> + Send + Sync,
             for<'c> &'c P: Executor<'c, Database = DB>;
}

Required Associated Types§

Required Methods§

Source

fn fetch_one_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Self::Output, Error>> + Send
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source

fn fetch_optional_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Option<Self::Output>, Error>> + Send
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source

fn fetch_all_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Vec<Self::Output>, Error>> + Send
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'q, DB, A> InstrumentedFetch<'q, DB> for Query<'q, DB, A>
where DB: Database, A: 'q + Send + IntoArguments<'q, DB>,

Source§

type Output = <DB as Database>::Row

Source§

async fn fetch_one_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Self::Output, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_optional_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Option<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_all_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Vec<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

impl<'q, DB, F, A, O> InstrumentedFetch<'q, DB> for Map<'q, DB, F, A>
where DB: Database, F: FnMut(DB::Row) -> Result<O, Error> + Send, O: Send + Unpin, A: 'q + Send + IntoArguments<'q, DB>,

Source§

type Output = O

Source§

async fn fetch_one_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Self::Output, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_optional_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Option<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_all_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Vec<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

impl<'q, DB, O, A> InstrumentedFetch<'q, DB> for QueryScalar<'q, DB, O, A>
where DB: Database, O: Send + Unpin + for<'r> Decode<'r, DB> + Type<DB>, A: 'q + Send + IntoArguments<'q, DB>, usize: ColumnIndex<DB::Row>,

Source§

type Output = O

Source§

async fn fetch_one_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Self::Output, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_optional_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Option<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Source§

async fn fetch_all_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> Result<Vec<Self::Output>, Error>
where P: InstrumentedPool<Database = DB> + Send + Sync, for<'c> &'c P: Executor<'c, Database = DB>,

Implementors§