File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 70
70
Use the untagged enum representation for this enum. See [ enum representations]
71
71
for details on this representation.
72
72
73
- When no variant matches, the error may be uninformative which can be improved
74
- with [ ` serde( expecting) ` ] ( #expecting ) .
73
+ When no variant matches, ` untagged ` does not produce an informative error but
74
+ this can be improved by adding an [ ` expecting ` ] ( #expecting ) message .
75
75
76
- In performance-critical code, checking each variant and processing the errors
77
- can be slow. In these cases, it may be better to hand-implement the
78
- deserialize trait for which [ serde-untagged] may help .
76
+ In performance-critical code, the implementation approach used by ` untagged `
77
+ can be costly. Consider implementing the Deserialize trait by hand or with the
78
+ help of the [ ` serde-untagged ` ] crate .
79
79
80
- [ serde-untagged ] : https://docs.rs/serde-untagged
80
+ [ ` serde-untagged` ] : https://docs.rs/serde-untagged
81
81
82
82
- ##### ` #[serde(bound = "T: MyTrait")] ` {#bound}
83
83
You can’t perform that action at this time.
0 commit comments