Function frame_support::storage::with_transaction
source · [−]pub fn with_transaction<R>(f: impl FnOnce() -> TransactionOutcome<R>) -> R
Expand description
Execute the supplied function in a new storage transaction.
All changes to storage performed by the supplied function are discarded if the returned
outcome is TransactionOutcome::Rollback
.
Transactions can be nested to any depth. Commits happen to the parent transaction.