serde-rs / serde-rs.github.io

https://serde.rs
Creative Commons Attribution Share Alike 4.0 International
22 stars 99 forks source link

Add note about skip attr on skip_serializing example #85

Closed drojf closed 5 years ago

drojf commented 5 years ago

Make it more obvious that the skip_serializing attribute only skips serializing and does not skip deserializing, and make user aware of the skip attribute which skips both serializing and deserializing, and skip_deserializing attribute which skips deserializing only.

I guess i'm of the opinion that if you only present the attribute skip_serializing to the user, the name alone doesn't make it clear that it doesn't skip both (or that there are two more relevant attributes for different behaviors). I realize it's documented in the field attributes section, but if you only look at this example then you may get confused (...as I did).