Expand description
Event access, conversion, filtering, and state-key utilities.
The module defines the common event trait and adapters for client and federation representations. It also exposes helpers for inspecting event data.
Re-exports§
pub use self::filter::Matches;pub use self::filter::trim_event_fields;pub use self::format::Owned;pub use self::format::Ref;pub use self::msgtype::MsgType;pub use self::relation::RelationTypeEqual;pub use self::state_key::StateKey;pub use self::state_key::TypeStateKey;pub use self::type_ext::TypeExt;pub use self::id::*;
Modules§
- content 🔒
- filter 🔒
- format 🔒
- id 🔒
- msgtype 🔒
- redact 🔒
- relation 🔒
- state_
key - State-event key types and ordering helpers.
- type_
ext 🔒 - unsigned 🔒
Structs§
- Member
Content 🔒 - Owned
- Owns an event for conversion into a Ruma event envelope.
- Ref
- Borrows an event for conversion into a Ruma event envelope.
Enums§
- MsgType
- The
msgtypeof anm.room.messageevent’s content.
Traits§
- Event
- Abstraction of a PDU so users can have their own PDU types.
- Matches
- Tests values against a Matrix filter.
- Relation
Type Equal - Compares an event’s relation type with a requested relation type.
- TypeExt
- Convenience trait for adding event type plus state key to state maps.
Functions§
- gen_
event_ id - Generates a correct eventId for the PDU. For v1/v2 incoming PDU’s the value’s event_id is passed through. For all outgoing PDU’s and for v3+ incoming PDU’s it is generated.
- gen_
event_ id_ canonical_ json - Generates a correct eventId for the incoming pdu.
- trim_
event_ fields - Restrict a serialized event to the requested
event_fieldsper MSC3980, returning it unchanged when no filter is set so the common sync pays nothing.