pub trait TransactionExecutor {
// Required methods
fn multi<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn queue_command<'life0, 'async_trait>(
&'life0 mut self,
command: Box<dyn TransactionCommand>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exec<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<Vec<RespValue>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn discard<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch<'life0, 'async_trait>(
&'life0 mut self,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unwatch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for executing transactions
Required Methods§
Sourcefn multi<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn multi<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start a transaction with MULTI
Sourcefn queue_command<'life0, 'async_trait>(
&'life0 mut self,
command: Box<dyn TransactionCommand>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn queue_command<'life0, 'async_trait>(
&'life0 mut self,
command: Box<dyn TransactionCommand>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a command in the transaction
Sourcefn exec<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<Vec<RespValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<Vec<RespValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the transaction with EXEC
Sourcefn discard<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discard<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Discard the transaction with DISCARD