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

Method push_function

crates/environ/src/module.rs:544–552  ·  view source on GitHub ↗

Appends a new function to this module with the given type information, used for functions that either don't escape or aren't certain whether they escape yet.

(&mut self, signature: impl Into<EngineOrModuleTypeIndex>)

Source from the content-addressed store, hash-verified

542 /// used for functions that either don't escape or aren't certain whether
543 /// they escape yet.
544 pub fn push_function(&mut self, signature: impl Into<EngineOrModuleTypeIndex>) -> FuncIndex {
545 let signature = signature.into();
546 self.functions
547 .push(FunctionType {
548 signature,
549 func_ref: FuncRefIndex::reserved_value(),
550 })
551 .panic_on_oom()
552 }
553
554 /// Returns an iterator over all of the defined function indices in this
555 /// module.

Callers 2

translate_payloadMethod · 0.45
push_typeMethod · 0.45

Calls 2

panic_on_oomMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected