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

Method param

crates/wasmtime/src/runtime/types.rs:2553–2560  ·  view source on GitHub ↗

Get the `i`th parameter type. Returns `None` if `i` is out of bounds.

(&self, i: usize)

Source from the content-addressed store, hash-verified

2551 ///
2552 /// Returns `None` if `i` is out of bounds.
2553 pub fn param(&self, i: usize) -> Option<ValType> {
2554 let engine = self.engine();
2555 self.registered_type
2556 .unwrap_func()
2557 .params()
2558 .get(i)
2559 .map(|ty| ValType::from_wasm_type(engine, ty))
2560 }
2561
2562 /// Returns the list of parameter types for this function.
2563 #[inline]

Callers

nothing calls this directly

Calls 5

engineMethod · 0.45
mapMethod · 0.45
getMethod · 0.45
paramsMethod · 0.45
unwrap_funcMethod · 0.45

Tested by

no test coverage detected