pub trait WasmEntryPoint: Sized {
    // Required methods
    fn as_entry(&self) -> &str;
    fn try_from_entry(entry: &str) -> Option<Self>;

    // Provided method
    fn try_into_kind(&self) -> Option<DispatchKind> { ... }
}
Expand description

Trait defining type could be used as entry point for a wasm module.

Required Methods§

source

fn as_entry(&self) -> &str

Converting self into entry point name.

source

fn try_from_entry(entry: &str) -> Option<Self>

Converting entry point name into self object, if possible.

Provided Methods§

source

fn try_into_kind(&self) -> Option<DispatchKind>

Tries to convert self into DispatchKind.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WasmEntryPoint for String

source§

fn as_entry(&self) -> &str

source§

fn try_from_entry(entry: &str) -> Option<Self>

Implementors§