Get access to a shared memory within this instance's memory index space. This permits accessing memories whether they are exported or not. However, it is only available for purposes of debugging, and so is only permitted when `guest_debug` is enabled in the Engine's configuration. The intent of the Wasmtime API is to enforce the Wasm type system's encapsulation even in the host API, except where
(
&self,
mut store: impl AsContextMut,
memory_index: u32,
)
| 248 | /// `None` is returned if guest-debugging is not enabled in the |
| 249 | /// engine configuration for this Store. |
| 250 | pub fn debug_shared_memory( |
| 251 | &self, |
| 252 | mut store: impl AsContextMut, |
| 253 | memory_index: u32, |
| 254 | ) -> Option<crate::SharedMemory> { |
| 255 | self.debug_export( |
| 256 | store.as_context_mut().0, |
| 257 | MemoryIndex::from_bits(memory_index).into(), |
| 258 | ) |
| 259 | .and_then(|s| s.into_shared_memory()) |
| 260 | } |
| 261 | |
| 262 | /// Get access to a table within this instance's table index |
| 263 | /// space. |
no test coverage detected