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

Method index_of

cranelift/interpreter/src/environment.rs:36–38  ·  view source on GitHub ↗

Retrieve the index of a function in the function store by its `name`.

(&self, name: &str)

Source from the content-addressed store, hash-verified

34
35 /// Retrieve the index of a function in the function store by its `name`.
36 pub fn index_of(&self, name: &str) -> Option<FuncIndex> {
37 self.function_names.get(name).cloned()
38 }
39
40 /// Retrieve a function by its index in the function store.
41 pub fn get_by_index(&self, index: FuncIndex) -> Option<&'a Function> {

Callers 3

get_by_nameMethod · 0.80
call_by_nameMethod · 0.80
function_addressMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected