pub struct HostFunctionRegistry { /* private fields */ }Implementations§
Source§impl HostFunctionRegistry
impl HostFunctionRegistry
pub fn new() -> Self
pub fn register<F>(&mut self, name: impl Into<String>, arity: u8, factory: F)
pub fn register_static( &mut self, name: impl Into<String>, arity: u8, function: StaticHostFunction, )
pub fn register_stack<F>( &mut self, name: impl Into<String>, arity: u8, factory: F, )
pub fn register_static_stack( &mut self, name: impl Into<String>, arity: u8, function: StaticHostStackFunction, )
pub fn register_args<F>( &mut self, name: impl Into<String>, arity: u8, factory: F, )
pub fn register_static_args( &mut self, name: impl Into<String>, arity: u8, function: StaticHostArgsFunction, )
pub fn bind_vm_cached(&self, vm: &mut Vm) -> VmResult<()>
pub fn prepare_plan(&self, imports: &[HostImport]) -> VmResult<HostBindingPlan>
pub fn bind_vm_with_plan( &self, vm: &mut Vm, plan: &HostBindingPlan, ) -> VmResult<()>
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HostFunctionRegistry
impl !UnwindSafe for HostFunctionRegistry
impl Freeze for HostFunctionRegistry
impl Send for HostFunctionRegistry
impl Sync for HostFunctionRegistry
impl Unpin for HostFunctionRegistry
impl UnsafeUnpin for HostFunctionRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more