Skip to main content

generate_rust

Function generate_rust 

Source
pub fn generate_rust(state: &ArchitectureState) -> String
Expand description

Generate a complete Rust source file from architecture state.

The returned string can be written to src/generated_schema.rs. It contains:

  • One <Name>Value struct per record (with Serialize / Deserialize)
  • One <Name>Key enum per record (with #[derive(RecordKey)])
  • A configure_schema<R>() function wiring all records into AimDbBuilder