| /// Compatibility shims which mimic some API surfaces of the current Rust bindings. |
| pub mod compat { |
| {% for ident in self.library().declaration_order %} |
| {% if !matches!(self.rust_or_rust_next_denylist(ident), Denylist::Denied) %} |
| {% match self.library().declarations[ident] %} |
| {% when DeclType::Bits %} |
| {{ self.bits(self.library().bits_declarations[ident] )}} |
| {% when DeclType::Enum %} |
| {{ self.enm(self.library().enum_declarations[ident] )}} |
| {% when DeclType::Protocol %} |
| {{ self.protocol(self.library().protocol_declarations[ident] )}} |
| {% when DeclType::Struct %} |
| {{ self.strct(self.library().struct_declarations[ident] )}} |
| {% when DeclType::Table %} |
| {{ self.table(self.library().table_declarations[ident] )}} |
| {% when DeclType::Union %} |
| {{ self.union(self.library().union_declarations[ident] )}} |
| {% else %} |
| {% endmatch %} |
| {% endif %} |
| {% endfor %} |
| } |