Trait prevayler_rs::Transaction[][src]

pub trait Transaction<T> {
    fn execute(self, data: &mut T);
}

The trait that defines the transaction behaivour. You must implement it to all your transactions.

Notice that the execute method does not return a Result. You should handle your errors and gurantee that the prevailed state is in a consistent state.

Transactions should be deterministic. Do all non-deterministic code outside the transaction and let your transaction just update the values.

Required methods

fn execute(self, data: &mut T)[src]

Loading content...

Implementors

impl<T, D> Transaction<T> for D where
    D: TransactionWithQuery<T>, 
[src]

Loading content...