mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-04 02:20:54 +01:00
This introduces the `serde_with` dependency and `rust_type.py`, to allow supporting arbitrary types for serialization. Since fields may have arbitrary types (eg. `HashMap<_, chrono::Duration>`) which need deserialization, it is necessary to use type-based serialization to avoid implementing (de)serialization for every permutation of types that require special serialization. However, `serde` does not let you (de)serialize one type as another (eg. `chrono::Duration` as `Wrapper`) - thus necessitating `serde_with`, which does. `rust_type.py` introduces the `RustType` class, which makes it easy to describe the (de)serialization type used by `serde_with`