sapling/eden/scm/lib/cpython-ext
Jun Wu b5a22da53c cpython-ext: add a serde deserializer that converts Python objects to Rust values
Summary:
The goal is to implement `FromPyObject` and `ToPyObject` more easily.
Today crates have to dependent on `cpython` to implement `From/ToPyObject`,
which is somewhat unwanted for pure Rust crates.

The `ser` module used to ignore the `variant` field for non-unit enum variants.
They have been fixed so the serialized value can be deserialized correctly.
For example, `enum E { A, B(T) }` will be serialized to `"A"` for `E::A`, and
`{"B": T}` for `E::B`.

Reviewed By: kulshrax

Differential Revision: D23966994

fbshipit-source-id: c50d57bf313caeec65a604ed9b05a5729f3b3635
2020-10-06 16:01:22 -07:00
..
src cpython-ext: add a serde deserializer that converts Python objects to Rust values 2020-10-06 16:01:22 -07:00
Cargo.toml cpython-ext: add a serde deserializer that converts Python objects to Rust values 2020-10-06 16:01:22 -07:00