de89f95f31
This allows end users to use an arbitrary expression to decide whether or not to serialize some field. This expression has access to all the fields in the struct, but none of the internal state of the Serialize implementation. For structs, serde implements this by creating a temporary trait and implementing the struct for it. For struct variants, the fields are copied by reference into a temporary struct first before implementing the temporary trait. This also fixes a bug where the serde_codegen wasn't making calls to Serializer::serialize_{tuple,struct}_variant{,_elt}. |
||
---|---|---|
.. | ||
benches | ||
tests | ||
build.rs | ||
Cargo.toml |