pub trait Fetch<'c, 'out, E>: ToSql + CheckedSqlwhere
E: Executor<'c> + 'out,{
type Output: for<'r> FromRow<'r, <E::Database as Database>::Row>;
// Provided methods
fn fetch_one(
&self,
exec: E,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'out>> { ... }
fn fetch_optional(
&self,
exec: E,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Output>, Error>> + Send + 'out>> { ... }
}
Required Associated Types§
Provided Methods§
fn fetch_one( &self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'out>>
fn fetch_optional( &self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Output>, Error>> + Send + 'out>>
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.