Struct sp_state_machine::StorageChanges
source · pub struct StorageChanges<Transaction, H: Hasher> {
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 transaction_index_changes: Vec<IndexOperation>,
}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: StorageCollectionAll changes to the main storage.
A value of None means that it was deleted.
child_storage_changes: ChildStorageCollectionAll changes to the child storages.
offchain_storage_changes: OffchainChangesCollectionOffchain state changes to write to the offchain database.
transaction: TransactionA transaction for the backend that contains all changes from
main_storage_changes and from
child_storage_changes.
offchain_storage_changes.
transaction_storage_root: H::OutThe storage root after applying the transaction.
transaction_index_changes: Vec<IndexOperation>Changes to the transaction index,
Implementations§
source§impl<Transaction, H: Hasher> StorageChanges<Transaction, H>
impl<Transaction, H: Hasher> StorageChanges<Transaction, H>
sourcepub fn into_inner(
self
) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, Transaction, H::Out, Vec<IndexOperation>)
pub fn into_inner( self ) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, Transaction, H::Out, Vec<IndexOperation>)
Deconstruct into the inner values
Trait Implementations§
Auto Trait Implementations§
impl<Transaction, H> RefUnwindSafe for StorageChanges<Transaction, H>where Transaction: RefUnwindSafe, <H as Hasher>::Out: RefUnwindSafe,
impl<Transaction, H> Send for StorageChanges<Transaction, H>where Transaction: Send,
impl<Transaction, H> Sync for StorageChanges<Transaction, H>where Transaction: Sync,
impl<Transaction, H> Unpin for StorageChanges<Transaction, H>where Transaction: Unpin, <H as Hasher>::Out: Unpin,
impl<Transaction, H> UnwindSafe for StorageChanges<Transaction, H>where Transaction: UnwindSafe, <H as Hasher>::Out: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.