Struct sp_state_machine::Ext [−][src]
pub struct Ext<'a, H, N, B> where
H: Hasher,
B: 'a + Backend<H>,
N: BlockNumber, { pub id: u16, // some fields omitted }
Expand description
Wraps a read-only backend, call executor, and current overlayed changes.
Fields
id: u16
Pseudo-unique id used for tracing.
Implementations
pub fn new(
overlay: &'a mut OverlayedChanges,
storage_transaction_cache: &'a mut StorageTransactionCache<B::Transaction, H, N>,
backend: &'a B,
changes_trie_state: Option<ChangesTrieState<'a, H, N>>,
extensions: Option<&'a mut Extensions>
) -> Self
pub fn new(
overlay: &'a mut OverlayedChanges,
storage_transaction_cache: &'a mut StorageTransactionCache<B::Transaction, H, N>,
backend: &'a B,
changes_trie_state: Option<ChangesTrieState<'a, H, N>>,
extensions: Option<&'a mut Extensions>
) -> Self
Create a new Ext
from overlayed changes and read-only backend
Trait Implementations
impl<'a, H, N, B> ExtensionStore for Ext<'a, H, N, B> where
H: Hasher,
B: 'a + Backend<H>,
N: BlockNumber,
impl<'a, H, N, B> ExtensionStore for Ext<'a, H, N, B> where
H: Hasher,
B: 'a + Backend<H>,
N: BlockNumber,
impl<'a, H, N, B> Externalities for Ext<'a, H, N, B> where
H: Hasher,
H::Out: Ord + 'static + Codec,
B: Backend<H>,
N: BlockNumber,
impl<'a, H, N, B> Externalities for Ext<'a, H, N, B> where
H: Hasher,
H::Out: Ord + 'static + Codec,
B: Backend<H>,
N: BlockNumber,
Renew existing piece of data storage.
Write a key value pair to the offchain storage database.
Read child runtime storage. Read more
Get child storage value hash. Read more
Whether a child storage entry exists.
Returns the key immediately following the given key, if it exists.
Returns the key immediately following the given key, if it exists, in child storage.
Set or clear a storage entry (key
) of current contract being called (effective
immediately). Read more
fn place_child_storage(
&mut self,
child_info: &ChildInfo,
key: StorageKey,
value: Option<StorageValue>
)
fn place_child_storage(
&mut self,
child_info: &ChildInfo,
key: StorageKey,
value: Option<StorageValue>
)
Set or clear a child storage entry.
Clear an entire child storage. Read more
Clear storage entries which keys are start with the given prefix. Read more
Clear child storage entries which keys are start with the given prefix. Read more
Get the trie root of the current storage map. Read more
Get the trie root of a child storage map. Read more
Index specified transaction slice and store it.
Get the changes trie root of the current storage overlay at a block with given parent
. Read more
Start a new nested transaction. Read more
Rollback the last transaction started by storage_start_transaction
. Read more
Commit the last transaction started by storage_start_transaction
. Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
Set storage entry key
of current contract being called (effective immediately).
Set child storage entry key
of current contract being called (effective immediately).
Clear a storage entry (key
) of current contract being called (effective immediately).
Auto Trait Implementations
impl<'a, H, N, B> !RefUnwindSafe for Ext<'a, H, N, B>
impl<'a, H, N, B> !UnwindSafe for Ext<'a, H, N, B>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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 more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub 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 more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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 more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
pub fn vzip(self) -> V