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

Method is_list_canonical

crates/rust/src/interface.rs:2640–2653  ·  view source on GitHub ↗
(&self, ty: &Type)

Source from the content-addressed store, hash-verified

2638 }
2639
2640 pub fn is_list_canonical(&self, ty: &Type) -> bool {
2641 if !self.resolve.all_bits_valid(ty) {
2642 return false;
2643 }
2644 match ty {
2645 // Note that tuples in Rust are not ABI-compatible with component
2646 // model tuples, so those are exempted here from canonical lists.
2647 Type::Id(id) => {
2648 let info = self.r#gen.types.get(*id);
2649 !info.has_resource && !info.has_tuple
2650 }
2651 _ => true,
2652 }
2653 }
2654}
2655
2656impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {

Callers 1

generate_payloadMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected