pub enum InvokeMethod<'a> {
Export(&'a str),
Table(u32),
TableWithWrapper {
dispatcher_ref: u32,
func: u32,
},
}
Expand description
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
Fields
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.
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.
Trait Implementations
sourceimpl<'a> From<&'a str> for InvokeMethod<'a>
impl<'a> From<&'a str> for InvokeMethod<'a>
sourcefn from(val: &'a str) -> InvokeMethod<'a>
fn from(val: &'a str) -> InvokeMethod<'a>
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for InvokeMethod<'a>
impl<'a> Send for InvokeMethod<'a>
impl<'a> Sync for InvokeMethod<'a>
impl<'a> Unpin for InvokeMethod<'a>
impl<'a> UnwindSafe for InvokeMethod<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.