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

Method params

crates/wasmtime/src/runtime/component/types.rs:954–961  ·  view source on GitHub ↗

Iterates over types of function parameters and names.

(&self)

Source from the content-addressed store, hash-verified

952
953 /// Iterates over types of function parameters and names.
954 pub fn params(&self) -> impl ExactSizeIterator<Item = (&str, Type)> + '_ {
955 let ty = &self.0.types[self.0.index];
956 self.0.types[ty.params]
957 .types
958 .iter()
959 .zip(&ty.param_names)
960 .map(|(ty, name)| (name.as_str(), Type::from(ty, &self.0.instance())))
961 }
962
963 /// Iterates over types of function results
964 pub fn results(&self) -> impl ExactSizeIterator<Item = Type> + '_ {

Callers 2

check_params_resultsMethod · 0.45
debug_typecheckMethod · 0.45

Calls 5

fromFunction · 0.85
mapMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45
instanceMethod · 0.45

Tested by

no test coverage detected