Skip to main content

TransactionExecutor

Trait TransactionExecutor 

Source
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§

Source

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

Source

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

Source

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

Source

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

Source

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,

Watch keys for changes

Source

fn unwatch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unwatch all keys

Implementors§