MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / multi_param_roundtrip

Method multi_param_roundtrip

tests/runtime/map/test.rs:70–78  ·  view source on GitHub ↗
(a: NamesById, b: BytesByName)

Source from the content-addressed store, hash-verified

68 }
69
70 fn multi_param_roundtrip(a: NamesById, b: BytesByName) -> (IdsByName, BytesByName) {
71 assert_eq!(a.len(), 2);
72 assert_eq!(b.len(), 1);
73 let mut ids = IdsByName::new();
74 for (id, name) in a {
75 ids.insert(name, id);
76 }
77 (ids, b)
78 }
79
80 fn nested_roundtrip(
81 a: wit_bindgen::rt::Map<String, wit_bindgen::rt::Map<u32, String>>,

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected