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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moresource§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<T> Pointable for T
impl<T> Pointable 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.