pub struct HostFunctionRegistry { /* private fields */ }Expand description
Registry of host functions available for import into WASM modules Uses IndexMap to preserve insertion order for deterministic function indices
Implementations§
Source§impl HostFunctionRegistry
impl HostFunctionRegistry
Sourcepub fn with_standard_functions() -> Self
pub fn with_standard_functions() -> Self
Create a new registry with standard SolverForge host functions
Sourcepub fn register(&mut self, def: HostFunctionDef)
pub fn register(&mut self, def: HostFunctionDef)
Register a host function
Sourcepub fn lookup(&self, name: &str) -> Option<&HostFunctionDef>
pub fn lookup(&self, name: &str) -> Option<&HostFunctionDef>
Look up a host function by name
Sourcepub fn function_names(&self) -> Vec<&str>
pub fn function_names(&self) -> Vec<&str>
Get all registered function names
Trait Implementations§
Source§impl Clone for HostFunctionRegistry
impl Clone for HostFunctionRegistry
Source§fn clone(&self) -> HostFunctionRegistry
fn clone(&self) -> HostFunctionRegistry
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HostFunctionRegistry
impl Debug for HostFunctionRegistry
Source§impl Default for HostFunctionRegistry
impl Default for HostFunctionRegistry
Source§fn default() -> HostFunctionRegistry
fn default() -> HostFunctionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HostFunctionRegistry
impl RefUnwindSafe for HostFunctionRegistry
impl Send for HostFunctionRegistry
impl Sync for HostFunctionRegistry
impl Unpin for HostFunctionRegistry
impl UnwindSafe for HostFunctionRegistry
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)