Struct sp_state_machine::ReadOnlyExternalities[][src]

pub struct ReadOnlyExternalities<'a, H: Hasher, B: 'a + Backend<H>> { /* fields omitted */ }
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

Formats the value using the given formatter. Read more

Tries to find a registered extension by the given type_id and returns it as a &mut dyn Any. Read more

Register extension extension with specified type_id. Read more

Deregister extension with speicifed ‘type_id’ and drop it. Read more

Write a key value pair to the offchain storage database.

Read runtime storage.

Get storage value hash. Read more

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

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

Append storage item. Read more

Get the trie root of the current storage map. Read more

Get the trie root of a child storage map. Read more

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

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 storage entry exists.

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

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.