pub trait DbExecutorArg: Send {
// Required methods
fn execute<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<u64, DbError>> + Send + 'a>>;
fn fetch_all<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<DbRow>, DbError>> + Send + 'a>>;
// Provided methods
fn fetch_optional<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<Option<DbRow>, DbError>> + Send + 'a>>
where Self: Send + 'a { ... }
fn fetch_one<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<DbRow, DbError>> + Send + 'a>>
where Self: Send + 'a { ... }
}Required Methods§
fn execute<'a>( &'a mut self, sql: &'a str, params: DbParams, ) -> Pin<Box<dyn Future<Output = Result<u64, DbError>> + Send + 'a>>
fn fetch_all<'a>( &'a mut self, sql: &'a str, params: DbParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<DbRow>, DbError>> + Send + 'a>>
Provided Methods§
fn fetch_optional<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<Option<DbRow>, DbError>> + Send + 'a>>where
Self: Send + 'a,
fn fetch_one<'a>(
&'a mut self,
sql: &'a str,
params: DbParams,
) -> Pin<Box<dyn Future<Output = Result<DbRow, DbError>> + Send + 'a>>where
Self: Send + 'a,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".