Skip to content

Commit c430c16

Browse files
authored
Port event content to Rust (#19725)
Based on #19708. This is on the path to porting the entire event class to Rust, as `event.content` will then return the new Rust class `JsonObject`. This PR adds a pure Rust `JsonObject` class that is a `Mapping` representing a json-style object. It uses `serde_json::Value` as its in-memory representation and `pythonize` for conversion when a field is looked up on the object. I'm not thrilled with the name, but couldn't think of a better one. This also adds `JsonObject` handling to the JSON serialisation functions we use, as well as to the `freeze(..)` function. Reviewable commit-by-commit.
1 parent 8dbbc40 commit c430c16

21 files changed

Lines changed: 749 additions & 63 deletions

File tree

changelog.d/19725.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Port `Event.content` field to Rust.

0 commit comments

Comments
 (0)