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Β§
use std::fmt::Debug;πuse std::fmt::Debug;πuse ruma::CanonicalJsonObject;πuse ruma::EventId;πuse ruma::MilliSecondsSinceUnixEpoch;πuse ruma::OwnedEventId;πuse ruma::RoomId;πuse ruma::UserId;πuse ruma::events::AnySyncMessageLikeEvent;πuse ruma::events::TimelineEventType;πuse ruma::events::room::member::MembershipState;πuse ruma::room_version_rules::RoomVersionRules;πuse ruma::serde::Raw;πuse serde::Deserialize;πuse serde::Deserialize;πuse serde_json::Value as JsonValue;πuse serde_json::value::RawValue as RawJsonValue;πuse tuwunel_core::Result;πuse tuwunel_core::utils;πuse tuwunel_core::utils::BoolExt;π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;use self::format::to_sync_message_like_without_unsigned;πuse self::msgtype::content_msgtype;πuse super::pdu::Pdu;π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 π
TraitsΒ§
- Event
- Abstraction of a PDU so users can have their own PDU types.
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.