mirror of
https://github.com/element-hq/synapse.git
synced 2026-05-14 14:45:10 +00:00
c81eead9e8
Small prerequisites for porting the Python EventBase hierarchy to Rust: - duration: make `from_milliseconds` const and add an `IntoPyObject` impl for owned `SynapseDuration`, so the new Rust `Event.sticky_duration()` can return one directly to Python. - internal_metadata: rename `copy()` to `deep_copy()` (matching the new naming used by the rest of the events module) and make `new()` callable from sibling modules. - json_object: expose `object` as a `pub` field and add a `get_field` helper so the new Event class can read from it without going through Python. - signatures, unsigned: add `deep_copy()` methods so the new Event class can implement its own deep-copy.