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
sourceimpl 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.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more