Struct sp_state_machine::ReadOnlyExternalities
source · [−]Expand description
Simple read-only externalities for any backend.
To be used in test for state inspection. Will panic if something writes to the storage.
Implementations
Execute the given closure while self
is set as externalities.
Returns the result of the given closure.
Trait Implementations
Write a key value pair to the offchain storage database.
Read child runtime storage. Read more
Get child storage value hash. Read more
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
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
fn get_whitelist(&self) -> Vec<TrackedStorageKey>ⓘ
fn get_whitelist(&self) -> Vec<TrackedStorageKey>ⓘ
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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).
Clear a child storage entry (key
) of current contract being called (effective
immediately). Read more
Whether a child storage entry exists.
Index specified transaction slice and store it.
Renew existing piece of transaction storage.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Benchmarking related functionality and shouldn’t be used anywhere else! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Read more
Auto Trait Implementations
impl<'a, H, B> RefUnwindSafe for ReadOnlyExternalities<'a, H, B> where
B: RefUnwindSafe,
H: RefUnwindSafe,
impl<'a, H, B> Send for ReadOnlyExternalities<'a, H, B> where
B: Sync,
impl<'a, H, B> Sync for ReadOnlyExternalities<'a, H, B> where
B: Sync,
impl<'a, H, B> Unpin for ReadOnlyExternalities<'a, H, B> where
H: Unpin,
impl<'a, H, B> UnwindSafe for ReadOnlyExternalities<'a, H, B> where
B: RefUnwindSafe,
H: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
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
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
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
The counterpart to unchecked_from
.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more