pub struct Linker<T> { /* private fields */ }
Implementations§
Source§impl<T> Linker<T>
impl<T> Linker<T>
pub fn new(_engine: &Engine) -> Self
pub fn instantiate( &self, store: impl AsContextMut<Data = T>, module: &Module, ) -> Result<Instance, Error>
pub async fn instantiate_async( &self, store: impl AsContextMut<Data = T>, module: &Module, ) -> Result<Instance>
pub fn func_new<F>( &mut self, module: &str, name: &str, _type: FuncType, func: F, ) -> Result<&mut Self>
pub fn func_wrap<Params, Results, F>(
&mut self,
module: &str,
name: &str,
func: F,
) -> Result<&mut Self>where
F: IntoMakeClosure<T, Params, Results> + 'static,
Auto Trait Implementations§
impl<T> Freeze for Linker<T>
impl<T> !RefUnwindSafe for Linker<T>
impl<T> !Send for Linker<T>
impl<T> !Sync for Linker<T>
impl<T> Unpin for Linker<T>
impl<T> !UnwindSafe for Linker<T>
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