0.24.0
(feat): Improve discriminated union design with inlined variants and constructors. When an inner
type is only referenced by a single union variant, its fields are now inlined directly into
the enum variant instead of using a wrapper struct with #[serde(flatten)]. All enum
variants now include #[non_exhaustive] for forward compatibility, and constructor methods
are generated for every variant (required since #[non_exhaustive] prevents direct
construction outside the crate). Empty variants use struct syntax (Variant {}) instead
of unit syntax.
0.23.0
(feat): Generate builders for all struct types. The builder pattern is inspired by
other popular Rust SDKs (e.g. AWS), so that users now have the option between the
following:
- The explicit constructor pattern (i.e. specify
Nonevalues for optional fields). - The
..Default::default()spread when a type has many optional fields. - The builder pattern when a type has many optional fields and cannot support the
..Default::default()approach.