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

Method force

crates/c-api/src/types/func.rs:27–38  ·  view source on GitHub ↗
(&mut self, engine: &Engine)

Source from the content-addressed store, hash-verified

25
26impl LazyFuncType {
27 pub(crate) fn force(&mut self, engine: &Engine) -> FuncType {
28 match self {
29 LazyFuncType::FuncType(ty) => ty.clone(),
30 LazyFuncType::Lazy { params, results } => {
31 let params = mem::take(params);
32 let results = mem::take(results);
33 let ty = FuncType::new(engine, params, results);
34 *self = LazyFuncType::FuncType(ty.clone());
35 ty
36 }
37 }
38 }
39
40 fn params(&self) -> impl ExactSizeIterator<Item = ValType> + '_ {
41 match self {

Callers 1

tyMethod · 0.80

Calls 3

newFunction · 0.50
FuncTypeClass · 0.50
cloneMethod · 0.45

Tested by

no test coverage detected