File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 58
58
59
59
When no variant matches, the error may be uninformative which can be improved with [ ` serde(expecting) ` ] ( #expecting ) .
60
60
61
+ In performance-critical code, checking each variant and processing the errors can be slow.
62
+ In these cases, it may be better to hand-implement the deserialize trait for which [ serde-untagged] may help.
63
+
61
64
- ##### ` #[serde(bound = "T: MyTrait")] ` {#bound}
62
65
63
66
Where-clause for the ` Serialize ` and ` Deserialize ` impls. This replaces any
122
125
Specify a custom type expectation text for deserialization error messages.
123
126
This is used by the generated ` expecting ` method for the container ` Visitor ` ,
124
127
and as a fallthrough error message for untagged enums.
128
+
129
+ [ serde-untagged ] : https://docs.rs/serde-untagged
You can’t perform that action at this time.
0 commit comments