pub trait HostFunctions:
'static
+ Send
+ Sync {
// Required methods
fn host_functions() -> Vec<&'static dyn Function>;
fn register_static<T>(
registry: &mut T,
) -> Result<(), <T as HostFunctionRegistry>::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 as HostFunctionRegistry>::Error>where
T: HostFunctionRegistry,
fn register_static<T>(
registry: &mut T,
) -> Result<(), <T as HostFunctionRegistry>::Error>where
T: HostFunctionRegistry,
Statically registers the host functions.
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.