pub fn transaction<Out, Err, F, T>(f: F) -> TransactionResult<Out, Err>
Expand description
A generic interface for defining transactions, where the transaction mode is
determined by the function’s parameter (it can be FallibleTransaction
or InfallibleTransaction
).
This makes switching between different transaction guarantees easier, but is more constrained than using the specific transaction functions where for retried transactions errors does not have to be handled.