Struct sp_state_machine::StorageChanges
source · pub struct StorageChanges<H: Hasher> {
pub main_storage_changes: StorageCollection,
pub child_storage_changes: ChildStorageCollection,
pub offchain_storage_changes: OffchainChangesCollection,
pub transaction: BackendTransaction<H>,
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: 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: BackendTransaction<H>
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.
transaction_index_changes: Vec<IndexOperation>
Changes to the transaction index,
Implementations§
source§impl<H: Hasher> StorageChanges<H>
impl<H: Hasher> StorageChanges<H>
sourcepub fn into_inner(
self,
) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, BackendTransaction<H>, H::Out, Vec<IndexOperation>)
pub fn into_inner( self, ) -> (StorageCollection, ChildStorageCollection, OffchainChangesCollection, BackendTransaction<H>, H::Out, Vec<IndexOperation>)
Deconstruct into the inner values
Trait Implementations§
Auto Trait Implementations§
impl<H> Freeze for StorageChanges<H>
impl<H> RefUnwindSafe for StorageChanges<H>
impl<H> Send for StorageChanges<H>
impl<H> Sync for StorageChanges<H>
impl<H> Unpin for StorageChanges<H>
impl<H> UnwindSafe for StorageChanges<H>
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
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
.