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.
Destructure this structure into the underlying parity-wasm Module.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RuntimeBlob
impl Send for RuntimeBlob
impl Sync for RuntimeBlob
impl Unpin for RuntimeBlob
impl UnwindSafe for RuntimeBlob
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