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

Method result

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

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

(&self, i: usize)

Source from the content-addressed store, hash-verified

2574 ///
2575 /// Returns `None` if `i` is out of bounds.
2576 pub fn result(&self, i: usize) -> Option<ValType> {
2577 let engine = self.engine();
2578 self.registered_type
2579 .unwrap_func()
2580 .results()
2581 .get(i)
2582 .map(|ty| ValType::from_wasm_type(engine, ty))
2583 }
2584
2585 /// Returns the list of result types for this function.
2586 #[inline]

Callers 2

Calls 5

engineMethod · 0.45
mapMethod · 0.45
getMethod · 0.45
resultsMethod · 0.45
unwrap_funcMethod · 0.45

Tested by

no test coverage detected