MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / build_module_def

Function build_module_def

crates/expr/src/check.rs:189–195  ·  view source on GitHub ↗
(types: Vec<(&str, ProductType)>)

Source from the content-addressed store, hash-verified

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

Callers 3

module_defFunction · 0.85
module_defFunction · 0.85
module_defFunction · 0.85

Calls 4

try_intoMethod · 0.80
newFunction · 0.50
finishMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…