Instantiates the [`Component`] provided into the `store` specified. This function will use the items defined within this [`Linker`] to satisfy the imports of the [`Component`] provided as necessary. For more information about this see [`Linker::instantiate_pre`] as well. # Errors Returns an error if this [`Linker`] doesn't define an import that `component` requires or if it is of the wrong type
(
&self,
mut store: impl AsContextMut<Data = T>,
component: &Component,
)
| 299 | /// memory allocation fails. See the `OutOfMemory` type's documentation for |
| 300 | /// details on Wasmtime's out-of-memory handling. |
| 301 | pub fn instantiate( |
| 302 | &self, |
| 303 | mut store: impl AsContextMut<Data = T>, |
| 304 | component: &Component, |
| 305 | ) -> Result<Instance> { |
| 306 | let store = store.as_context_mut(); |
| 307 | store.0.validate_sync_call()?; |
| 308 | self.instantiate_pre(component)?.instantiate(store) |
| 309 | } |
| 310 | |
| 311 | /// Instantiates the [`Component`] provided into the `store` specified. |
| 312 | /// |
nothing calls this directly
no test coverage detected