gear_core::message

Trait WasmEntryPoint

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§