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

Method from

cranelift/interpreter/src/environment.rs:20–24  ·  view source on GitHub ↗
(function: &'a Function)

Source from the content-addressed store, hash-verified

18/// This is a helpful conversion for instantiating a store from a single [Function].
19impl<'a> From<&'a Function> for FunctionStore<'a> {
20 fn from(function: &'a Function) -> Self {
21 let mut store = FunctionStore::default();
22 store.add(function.name.to_string(), function);
23 store
24 }
25}
26
27impl<'a> FunctionStore<'a> {

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected