Module builder

Module builder 

Source
Expand description

Code generation building blocks.

This module provides the core primitives for generating code:

  • CodeBuilder - Fluent API for building indented code
  • CodeFragment - Intermediate representation for code pieces
  • Renderable - Trait for types that can be converted to code fragments
  • FileBuilder - Composition of imports and code
  • Indent - Indentation configuration

Structs§

CodeBuilder
Fluent API for building code with proper indentation.
FileBuilder
Composable file builder that combines import collection with code generation.

Enums§

CodeFragment
Represents a fragment of generated code.
Indent
Indentation style for generated code.

Traits§

Renderable
Trait for types that can be rendered to code fragments.