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

Method func_insert

crates/wasmtime/src/runtime/linker.rs:405–412  ·  view source on GitHub ↗
(&mut self, module: &str, name: &str, func: HostFunc)

Source from the content-addressed store, hash-verified

403 }
404
405 fn func_insert(&mut self, module: &str, name: &str, func: HostFunc) -> Result<&mut Self>
406 where
407 T: 'static,
408 {
409 let key = self.import_key(module, Some(name))?;
410 self.insert(key, Definition::HostFunc(try_new(func)?))?;
411 Ok(self)
412 }
413
414 /// Creates a [`Func::new`]-style function named in this linker.
415 ///

Callers 5

func_newMethod · 0.80
func_new_uncheckedMethod · 0.80
func_new_asyncMethod · 0.80
func_wrapMethod · 0.80
func_wrap_asyncMethod · 0.80

Calls 5

OkFunction · 0.85
import_keyMethod · 0.80
HostFuncClass · 0.70
try_newFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected