fn with_nested_context<F>(&mut self, dest: T::AccountId, trie_id: TrieId, func: F)
		-> ExecResult
		where F: FnOnce(&mut ExecutionContext<T, V, L>) -> ExecResult
	{
		use frame_support::storage::TransactionOutcome::*;
		let mut nested = self.nested(dest, trie_id);
		frame_support::storage::with_transaction(|| {
			let output = func(&mut nested);
			match output {
				Ok(ref rv) if !rv.flags.contains(ReturnFlags::REVERT) => Commit(output),
				_ => Rollback(output),
			}
		})
	}
/// Execute the given closure within a nested execution context.
Execute the given closure within a nested execution context.
Execute the given closure within a nested execution context .
fn with_nested_context<F>(&mut self, dest: T::AccountId, trie_id: TrieId, func: F)
		-> ExecResult
		where F: FnOnce(&mut ExecutionContext<T, V, L>) -> ExecResult
	{
		use frame_support::storage::TransactionOutcome::*;
		let mut nested = self.nested(dest, trie_id);
		frame_support::storage::with_transaction(|| {
			let output = func(&mut nested);
			match output {
				Ok(ref rv) if !rv.flags.contains(ReturnFlags::REVERT) => Commit(output),
				_ => Rollback(output),
			}
		})
	}
fn with_nested_context < F > ( & mut self , dest : T :: AccountId , trie_id : TrieId , func : F ) -> ExecResult where F : FnOnce ( & mut ExecutionContext < T , V , L > ) -> ExecResult { use frame_support :: storage :: TransactionOutcome :: * ; let mut nested = self . nested ( dest , trie_id ) ; frame_support :: storage :: with_transaction ( | | { let output = func ( & mut nested ) ; match output { Ok ( ref rv ) if ! rv . flags . contains ( ReturnFlags :: REVERT ) => Commit ( output ) , _ => Rollback ( output ) , } } ) }
Execute the given closure within a nested execution context.
Execute the given closure within a nested execution context .
&mut self
dest
T::AccountId
trie_id
TrieId
func
F
&mut self
dest
T::AccountId
trie_id
TrieId
func
F