Skip to main content

Module code_gen

Module code_gen 

Source
Expand description

Code generation: schema → source in a target language.

A CodeGenBackend takes the intermediate JsonSchema and returns generated source as bytes. The CLI matches on the language argument and calls the appropriate backend (e.g. the Rust backend).

Structs§

CodeGenSettings
Language-agnostic code generation settings.
CodeGenSettingsBuilder
Builder for CodeGenSettings.
GenerateRustOutput
Output of Rust code generation: optional shared buffer plus one buffer per input schema.
RustBackend
Backend that emits Rust structs (serde-compatible).

Enums§

CodeGenError
Errors that can occur during code generation.
DedupeMode
Whether and how to deduplicate structurally identical object schemas across and within schemas.
ModelNameSource
How to choose the generated struct/type name when both title and property key are available.

Traits§

CodeGenBackend
Contract for a codegen backend: schemas in, GenerateRustOutput with optional shared buffer and per-schema buffers.

Functions§

generate_rust
Generate Rust source from one or more parsed schemas.

Type Aliases§

CodeGenResult
Result type for code generation operations.