MCPcopy Create free account
hub / github.com/bluejekyll/wasmtime-java / from_instance

Method from_instance

wasmtime-jni/src/ty/wasm_alloc.rs:40–46  ·  view source on GitHub ↗
(instance: &Instance, mut store: impl AsContextMut)

Source from the content-addressed store, hash-verified

38 }
39
40 pub fn from_instance(instance: &Instance, mut store: impl AsContextMut) -> Option<Self> {
41 Self::from(
42 instance.get_memory(&mut store, MEMORY_EXPORT),
43 instance.get_func(&mut store, ALLOC_EXPORT),
44 instance.get_func(&mut store, DEALLOC_EXPORT),
45 )
46 }
47
48 fn from(memory: Option<Memory>, alloc: Option<Func>, dealloc: Option<Func>) -> Option<Self> {
49 Some(Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected