pub trait RedisCommandExecutor: Send + Sync {
// Required methods
fn execute_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
cmd: &'life1 RedisCommand,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn reconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Abstraction over a Redis connection that can execute commands.
This trait enables testing retry/reconnect behavior without a live Redis by allowing injection of a fake implementation.
Required Methods§
Sourcefn execute_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
cmd: &'life1 RedisCommand,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
cmd: &'life1 RedisCommand,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a Redis command against the given exchange.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".