> This page is for SDK.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 0.24.0

**`(feat):`** 通过内联变体和构造函数改进有差别联合设计。当内部类型仅被单个联合变体引用时，其字段现在直接内联到枚举变体中，而不是使用带有 `#[serde(flatten)]` 的包装器结构体。所有枚举变体现在都包含 `#[non_exhaustive]` 以实现向前兼容性，并为每个变体生成构造函数方法（由于 `#[non_exhaustive]` 阻止在包外部直接构造，这是必需的）。空变体使用结构体语法（`Variant {}`）而不是单元语法。

## 0.23.0

**`(feat):`** 为所有结构体类型生成构建器。构建器模式受其他流行 Rust SDK（例如 AWS）启发，因此用户现在可以在以下选项中选择：

1. 显式构造函数模式（即为可选字段指定 `None` 值）。
2. 当类型有许多可选字段时的 `..Default::default()` 展开。
3. 当类型有许多可选字段且无法支持 `..Default::default()` 方法时的构建器模式。