Open 1tgr opened 5 years ago
I think this was fixed by https://github.com/3Hren/msgpack-rust/commit/a34ab8fcca9f1133ec1c4fc446a59b71acf5613e.
Is it possible to provide a small code example of how to use extension types to serialize individual fields in a struct?
The
toml
crate has a trick for this. Theirserialize_struct
recognises their built-indatetime
type by name, and delegates to a specialised serializer: https://github.com/alexcrichton/toml-rs/blob/c1a369f44762045e65989caa9491e153d1f358e6/src/ser.rs#L949-L952Likewise to deserialize: https://github.com/alexcrichton/toml-rs/blob/c1a369f44762045e65989caa9491e153d1f358e6/src/de.rs#L582-L589