pub trait Command: Send + Sync {
// Required methods
fn connection(&self) -> Arc<dyn Connection> ⓘ;
fn add_middleware(&self, middleware: Arc<dyn CommandMiddleware>);
fn execute_reader_native<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 Native,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn execute_native<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 Native,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn execute_reader<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn execute_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
statement: &'life1 dyn Statement,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn execute_reader_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
statement: &'life1 dyn Statement,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Required Methods§
fn connection(&self) -> Arc<dyn Connection> ⓘ
fn add_middleware(&self, middleware: Arc<dyn CommandMiddleware>)
fn execute_reader_native<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 Native,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_native<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 Native,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
fn execute_reader<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
statement: &'life1 dyn Statement,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_reader_statement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
statement: &'life1 dyn Statement,
parameters: Option<&'life2 [Parameter]>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Reader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".