Expand description
Type-level optimization utilities for reducing schema complexity.
This module defines the Optimizer
and supporting logic for transforming
a MetaTypes
structure into a simpler, cleaner, and smaller form.
Optimizations include:
- Flattening nested complex types
- Removing unused or duplicate unions/enums
- Resolving typedef chains
- Normalizing choice cardinalities
- Simplifying unrestricted base types
These transformations are especially useful before code generation, to avoid verbose or redundant Rust output and ensure efficient, idiomatic structures.
Structs§
- Optimizer
- Optimizes a
MetaTypes
structure by reducing redundant or verbose type definitions. - Unrestricted
Base Flags - Flags to control the
Optimizer::use_unrestricted_base_type
.