Skip to main content

Module event

Module event 

Source
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Β§

MemberContent πŸ”’

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.