File tree 1 file changed +1
-1
lines changed
1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -717,7 +717,7 @@ <h2 id="untagged"><a name="untagged" class="plugin-anchor" href="#untagged"><i c
717
717
< p > There is no explicit tag identifying which variant the data contains. Serde will
718
718
try to match the data against each variant in order and the first one that
719
719
deserializes successfully is the one returned.</ p >
720
- < p > This representation can handle enums containing any type of variant.</ p >
720
+ < p > This representation can handle enums containing any type of variant. However, all unit variants will always serialize as `null`. </ p >
721
721
< p > As another example of an untagged enum, this enum can be deserialized from
722
722
either an integer or an array of two strings:</ p >
723
723
< pre > < code class ="lang-rust "> < span class ="hljs-meta "> #[derive(Serialize, Deserialize)]</ span >
You can’t perform that action at this time.
0 commit comments