Struct wasmtime_runtime::ModuleMemoryImages
source · pub struct ModuleMemoryImages { /* private fields */ }
Expand description
Backing images for memories in a module.
This is meant to be built once, when a module is first loaded/constructed, and then used many times for instantiation.
Implementations§
source§impl ModuleMemoryImages
impl ModuleMemoryImages
sourcepub fn get_memory_image(
&self,
defined_index: DefinedMemoryIndex
) -> Option<&Arc<MemoryImage>>
pub fn get_memory_image( &self, defined_index: DefinedMemoryIndex ) -> Option<&Arc<MemoryImage>>
Get the MemoryImage for a given memory.
source§impl ModuleMemoryImages
impl ModuleMemoryImages
sourcepub fn new(
module: &Module,
wasm_data: &[u8],
mmap: Option<&MmapVec>
) -> Result<Option<ModuleMemoryImages>>
pub fn new( module: &Module, wasm_data: &[u8], mmap: Option<&MmapVec> ) -> Result<Option<ModuleMemoryImages>>
Create a new ModuleMemoryImages
for the given module. This can be
passed in as part of a InstanceAllocationRequest
to speed up
instantiation and execution by using copy-on-write-backed memories.
Auto Trait Implementations§
impl RefUnwindSafe for ModuleMemoryImages
impl Send for ModuleMemoryImages
impl Sync for ModuleMemoryImages
impl Unpin for ModuleMemoryImages
impl UnwindSafe for ModuleMemoryImages
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