pub struct HostBindings { /* private fields */ }Implementations§
Source§impl HostBindings
impl HostBindings
pub fn new() -> Self
pub fn add_function<F>(&mut self, name: impl Into<String>, f: F)
pub fn add_namespace( &mut self, name: impl Into<String>, members: HashMap<String, HostFn>, )
pub fn add_async_function<F, Fut>(&mut self, name: impl Into<String>, f: F)
pub fn add_async_namespace( &mut self, name: impl Into<String>, members: HashMap<String, AsyncHostFn>, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostBindings
impl !RefUnwindSafe for HostBindings
impl Send for HostBindings
impl Sync for HostBindings
impl Unpin for HostBindings
impl UnsafeUnpin for HostBindings
impl !UnwindSafe for HostBindings
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