pub struct Instance { /* private fields */ }
Implementations§
Source§impl Instance
impl Instance
pub fn new( _store: impl AsContextMut, module: &Module, _imports: &[()], ) -> Result<Self>
pub async fn new_async( _store: impl AsContextMut, module: &Module, _imports: &[()], ) -> Result<Self>
pub fn get_memory( &self, _store: impl AsContextMut, name: &str, ) -> Option<Memory>
pub fn get_func(&self, _store: impl AsContextMut, name: &str) -> Option<Func>
pub fn get_typed_func<Params: ToJsValue, Results: FromJsValue>( &self, _store: impl AsContextMut, name: &str, ) -> Result<TypedFunc<Params, Results>>
Auto Trait Implementations§
impl Freeze for Instance
impl !RefUnwindSafe for Instance
impl !Send for Instance
impl !Sync for Instance
impl Unpin for Instance
impl !UnwindSafe for Instance
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