diff --git a/_src/container-attrs.md b/_src/container-attrs.md index fa5b0bc..5090dc6 100644 --- a/_src/container-attrs.md +++ b/_src/container-attrs.md @@ -70,6 +70,13 @@ Use the untagged enum representation for this enum. See [enum representations] for details on this representation. + When no variant matches, the error may be uninformative which can be improved with [`serde(expecting)`](#expecting). + + In performance-critical code, checking each variant and processing the errors can be slow. + In these cases, it may be better to hand-implement the deserialize trait for which [serde-untagged] may help. + + [serde-untagged]: https://docs.rs/serde-untagged + - ##### `#[serde(bound = "T: MyTrait")]` {#bound} Where-clause for the `Serialize` and `Deserialize` impls. This replaces any