(types: Vec<(&str, ProductType)>)
| 187 | use super::SchemaView; |
| 188 | |
| 189 | pub fn build_module_def(types: Vec<(&str, ProductType)>) -> ModuleDef { |
| 190 | let mut builder = RawModuleDefV9Builder::new(); |
| 191 | for (name, ty) in types { |
| 192 | builder.build_table_with_new_type(RawIdentifier::new(name), ty, true); |
| 193 | } |
| 194 | builder.finish().try_into().expect("failed to generate module def") |
| 195 | } |
| 196 | |
| 197 | pub struct SchemaViewer(pub ModuleDef); |
| 198 |
no test coverage detected
searching dependent graphs…