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
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§
source§impl<'a> From<&'a str> for InvokeMethod<'a>
impl<'a> From<&'a str> for InvokeMethod<'a>
source§fn from(val: &'a str) -> InvokeMethod<'a>
fn from(val: &'a str) -> InvokeMethod<'a>
Converts to this type from the input type.
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§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.