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

Method typecheck

crates/wasmtime/src/runtime/component/types.rs:973–982  ·  view source on GitHub ↗
(&self, cx: &InstanceType)

Source from the content-addressed store, hash-verified

971
972 #[doc(hidden)]
973 pub fn typecheck<Params, Return>(&self, cx: &InstanceType) -> crate::Result<()>
974 where
975 Params: crate::component::ComponentNamedList + crate::component::Lower,
976 Return: crate::component::ComponentNamedList + crate::component::Lift,
977 {
978 let ty = &self.0.types[self.0.index];
979 Params::typecheck(&InterfaceType::Tuple(ty.params), cx)?;
980 Return::typecheck(&InterfaceType::Tuple(ty.results), cx)?;
981 Ok(())
982 }
983}
984
985/// Core module type

Callers 1

funcMethod · 0.45

Calls 3

OkFunction · 0.85
TupleClass · 0.70
typecheckFunction · 0.50

Tested by

no test coverage detected