Skip to main content

ApplyTransactionAction

Trait ApplyTransactionAction 

Source
pub trait ApplyTransactionAction {
    // Required method
    fn apply(self, tx: Transaction) -> Result<Transaction>;
}
Expand description

A helper trait for applying a TransactionAction to a Transaction.

This is implemented for all TransactionAction types to allow easy chaining of actions into a transaction context.

Required Methods§

Source

fn apply(self, tx: Transaction) -> Result<Transaction>

Adds this action to the given transaction.

§Arguments
  • tx - The transaction to apply the action to.
§Returns

The modified transaction containing this action, or an error if the operation fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: TransactionAction + 'static> ApplyTransactionAction for T