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§
fn fetch_one_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Self::Output, Error>> + Send
fn fetch_optional_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Option<Self::Output>, Error>> + Send
fn fetch_all_instrumented<P>( self, pool: &P, sql: impl AsRef<str> + Send, ) -> impl Future<Output = Result<Vec<Self::Output>, Error>> + Send
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.