Skip to main content

NativeExecutionDispatch

Trait NativeExecutionDispatch 

Source
pub trait NativeExecutionDispatch: Send + Sync {
    type ExtendHostFunctions: HostFunctions;

    // Required methods
    fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>>;
    fn native_version() -> NativeVersion;
}
Expand description

Delegate for dispatching a CodeExecutor call.

By dispatching we mean that we execute a runtime function specified by it’s name.

Required Associated Types§

Source

type ExtendHostFunctions: HostFunctions

Host functions for custom runtime interfaces that should be callable from within the runtime besides the default Substrate runtime interfaces.

Required Methods§

Source

fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>>

Dispatch a method in the runtime.

Source

fn native_version() -> NativeVersion

Provide native runtime version.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§