Trait sp_wasm_interface::HostFunctions
source · pub trait HostFunctions: 'static + Send + Sync {
// Required methods
fn host_functions() -> Vec<&'static dyn Function>;
fn register_static<T>(registry: &mut T) -> Result<(), T::Error>
where T: HostFunctionRegistry;
}
Expand description
Something that provides implementations for host functions.
Required Methods§
sourcefn host_functions() -> Vec<&'static dyn Function>
fn host_functions() -> Vec<&'static dyn Function>
Returns the host functions Self
provides.
sourcefn register_static<T>(registry: &mut T) -> Result<(), T::Error>where
T: HostFunctionRegistry,
fn register_static<T>(registry: &mut T) -> Result<(), T::Error>where T: HostFunctionRegistry,
Statically registers the host functions.