Struct sc_executor_common::runtime_blob::RuntimeBlob[][src]

pub struct RuntimeBlob { /* fields omitted */ }
Expand description

A bunch of information collected from a WebAssembly module.

Implementations

Create RuntimeBlob from the given wasm code. Will attempt to decompress the code before deserializing it.

See sp_maybe_compressed_blob for details about decompression.

Create RuntimeBlob from the given wasm code.

Returns Err if the wasm code cannot be deserialized.

The number of globals defined in locally in this module.

The number of imports of globals.

Perform an instrumentation that makes sure that the mutable globals are exported.

Run a pass that instrument this module so as to introduce a deterministic stack height limit.

It will introduce a global mutable counter. The instrumentation will increase the counter according to the “cost” of the callee. If the cost exceeds the stack_depth_limit constant, the instrumentation will trap. The counter will be decreased as soon as the the callee returns.

The stack cost of a function is computed based on how much locals there are and the maximum depth of the wasm operand stack.

Perform an instrumentation that makes sure that a specific function entry_point is exported

Scans the wasm blob for the first section with the name that matches the given. Returns the contents of the custom section if found or None otherwise.

Consumes this runtime blob and serializes it.

Destructure this structure into the underlying parity-wasm Module.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.