Struct sp_state_machine::StorageChanges
source · [−]pub struct StorageChanges<Transaction, H: Hasher, N: BlockNumber> {
pub main_storage_changes: StorageCollection,
pub child_storage_changes: ChildStorageCollection,
pub offchain_storage_changes: OffchainChangesCollection,
pub transaction: Transaction,
pub transaction_storage_root: H::Out,
pub changes_trie_transaction: Option<ChangesTrieTransaction<H, N>>,
}
Expand description
A storage changes structure that can be generated by the data collected in OverlayedChanges
.
This contains all the changes to the storage and transactions to apply theses changes to the backend.
Fields
main_storage_changes: StorageCollection
All changes to the main storage.
A value of None
means that it was deleted.
child_storage_changes: ChildStorageCollection
All changes to the child storages.
offchain_storage_changes: OffchainChangesCollection
Offchain state changes to write to the offchain database.
transaction: Transaction
A transaction for the backend that contains all changes from
main_storage_changes
and from
child_storage_changes
.
offchain_storage_changes
.
transaction_storage_root: H::Out
The storage root after applying the transaction.
changes_trie_transaction: Option<ChangesTrieTransaction<H, N>>
Contains the transaction for the backend for the changes trie.
If changes trie is disabled the value is set to None
.
Implementations
sourceimpl<Transaction, H: Hasher, N: BlockNumber> StorageChanges<Transaction, H, N>
impl<Transaction, H: Hasher, N: BlockNumber> StorageChanges<Transaction, H, N>
sourcepub fn into_inner(
self
) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, Transaction, H::Out, Option<ChangesTrieTransaction<H, N>>)
pub fn into_inner(
self
) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, Transaction, H::Out, Option<ChangesTrieTransaction<H, N>>)
Deconstruct into the inner values
Trait Implementations
sourceimpl<Transaction: Default, H: Hasher, N: BlockNumber> Default for StorageChanges<Transaction, H, N>
impl<Transaction: Default, H: Hasher, N: BlockNumber> Default for StorageChanges<Transaction, H, N>
Auto Trait Implementations
impl<Transaction, H, N> RefUnwindSafe for StorageChanges<Transaction, H, N> where
H: RefUnwindSafe,
N: RefUnwindSafe,
Transaction: RefUnwindSafe,
<H as Hasher>::Out: RefUnwindSafe,
impl<Transaction, H, N> Send for StorageChanges<Transaction, H, N> where
Transaction: Send,
impl<Transaction, H, N> Sync for StorageChanges<Transaction, H, N> where
Transaction: Sync,
impl<Transaction, H, N> Unpin for StorageChanges<Transaction, H, N> where
H: Unpin,
N: Unpin,
Transaction: Unpin,
<H as Hasher>::Out: Unpin,
impl<Transaction, H, N> UnwindSafe for StorageChanges<Transaction, H, N> where
H: UnwindSafe,
N: UnwindSafe,
Transaction: UnwindSafe,
<H as Hasher>::Out: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.