Looks up an exported [`SharedMemory`] value by name. Returns `None` if there was no export named `name`, or if there was but it wasn't a shared memory. # Panics Panics if `store` does not own this instance.
(
&self,
mut store: impl AsContextMut,
name: &str,
)
| 562 | /// |
| 563 | /// Panics if `store` does not own this instance. |
| 564 | pub fn get_shared_memory( |
| 565 | &self, |
| 566 | mut store: impl AsContextMut, |
| 567 | name: &str, |
| 568 | ) -> Option<SharedMemory> { |
| 569 | let mut store = store.as_context_mut(); |
| 570 | self.get_export(&mut store, name)?.into_shared_memory() |
| 571 | } |
| 572 | |
| 573 | /// Looks up an exported [`Global`] value by name. |
| 574 | /// |