Enum sc_executor_common::wasm_runtime::InvokeMethod[][src]

pub enum InvokeMethod<'a> {
    Export(&'a str),
    Table(u32),
    TableWithWrapper {
        dispatcher_ref: u32,
        func: u32,
    },
}

A method to be used to find the entrypoint when calling into the runtime

Contains variants on how to resolve wasm function that will be invoked.

Variants

Export(&'a str)

Call function exported with this name.

Located function should have (u32, u32) -> u64 signature.

Table(u32)

Call a function found in the exported table found under the given index.

Located function should have (u32, u32) -> u64 signature.

TableWithWrapper

Call function by reference from table through a wrapper.

Invoked function (dispatcher_ref) function should have (u32, u32, u32) -> u64 signature.

func will be passed to the invoked function as a first argument.

Fields of TableWithWrapper

dispatcher_ref: u32

Wrapper for the call.

Function pointer, index into runtime exported table.

func: u32

Extra argument for dispatch.

Common usage would be to use it as an actual wasm function pointer that should be invoked, but can be used as any extra argument on the callee side.

This is typically generated and invoked by the runtime itself.

Trait Implementations

impl<'a> From<&'a str> for InvokeMethod<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for InvokeMethod<'a>[src]

impl<'a> Send for InvokeMethod<'a>[src]

impl<'a> Sync for InvokeMethod<'a>[src]

impl<'a> Unpin for InvokeMethod<'a>[src]

impl<'a> UnwindSafe for InvokeMethod<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,