MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get_memory

Method get_memory

crates/debugger/src/host/api.rs:312–325  ·  view source on GitHub ↗
(
        &mut self,
        self_: Resource<Instance>,
        d: Resource<Debuggee>,
        memory_index: u32,
    )

Source from the content-addressed store, hash-verified

310 }
311
312 async fn get_memory(
313 &mut self,
314 self_: Resource<Instance>,
315 d: Resource<Debuggee>,
316 memory_index: u32,
317 ) -> Result<Resource<Memory>> {
318 let instance = *self.get(&self_)?;
319 let d = debugger(self, &d)?;
320 let memory = d
321 .instance_get_memory(instance, memory_index)
322 .await?
323 .ok_or(wit::Error::InvalidEntity)?;
324 Ok(self.push(memory)?)
325 }
326
327 async fn get_global(
328 &mut self,

Callers

nothing calls this directly

Calls 5

debuggerFunction · 0.85
OkFunction · 0.85
instance_get_memoryMethod · 0.80
getMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected