Get the instance associated with the current frame.
(&self, mut store: impl AsContextMut)
| 521 | |
| 522 | /// Get the instance associated with the current frame. |
| 523 | pub fn instance(&self, mut store: impl AsContextMut) -> Result<Instance> { |
| 524 | let store = store.as_context_mut(); |
| 525 | let instance = self.raw_instance(store.0.as_store_opaque())?; |
| 526 | let id = instance.id(); |
| 527 | Ok(Instance::from_wasmtime(id, store.0.as_store_opaque())) |
| 528 | } |
| 529 | |
| 530 | /// Get the module associated with the current frame, if any |
| 531 | /// (i.e., not a container instance for a host-created entity). |