Understand TypedBuilder limitations and behavior
masterWhen using typed-builder, keep the following architectural constraints in mind:
- Error Reporting: If you forget a field or set a field twice, the compiler error may appear as a deprecation warning rather than a primary error.
- Builder Lifecycle: All builder methods are call-by-move. The builder is not
Cloneand is not intended to be passed around or stored; it is designed strictly for ergonomic object creation. - Complexity: The generated builder type uses many generic parameters and has an internal name that is not meant for manual manipulation.
- Performance: Unlike
safe-builder-derivewhich can cause exponential build times,typed-builderencodes state in generic arguments, ensuring Rust only generates the code paths you actually use.