pub trait Executor: Send + Sync {
type Transaction<'a>: 'a + Transaction<'a>
where Self: 'a;
// Required methods
fn name() -> &'static str;
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [&'life3 Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<Vec<KeyValue>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn txn_executor<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Transaction<'a>>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
// Provided method
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [&'life3 Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Query executor for rds. It can execute queries or generate a transaction executor.
Required Associated Types§
type Transaction<'a>: 'a + Transaction<'a> where Self: 'a
Required Methods§
fn name() -> &'static str
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [&'life3 Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<Vec<KeyValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn txn_executor<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Transaction<'a>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Provided Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [&'life3 Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
query: &'life1 str,
params: &'life2 [&'life3 Vec<u8>],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Some queries don’t need to return any result, such as DELETE.
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.