Expand description
Persistent data unit storage and federation-format utilities.
The module contains the stored event representation, sequence identifiers, builders, and validation helpers. Its wire-format adapters account for room-version rules.
Re-exportsΒ§
use std::cmp::Ordering;πuse ruma::CanonicalJsonObject;πuse ruma::CanonicalJsonValue;πuse ruma::EventId;πuse ruma::MilliSecondsSinceUnixEpoch;πuse ruma::OwnedEventId;πuse ruma::OwnedRoomId;πuse ruma::OwnedServerName;πuse ruma::OwnedUserId;πuse ruma::RoomId;πuse ruma::UInt;πuse ruma::UserId;πuse ruma::canonical_json::redact_in_place;πuse ruma::events::TimelineEventType;πuse ruma::room_version_rules::RedactionRules;πuse ruma::room_version_rules::RoomVersionRules;πuse ruma::serde::Raw;πuse serde::Deserialize;πuse serde::Deserialize;πuse serde::Serialize;πuse serde::Serialize;πuse serde_json::value::RawValue as RawJsonValue;πuse smallvec::SmallVec;πuse tuwunel_core::Err;πuse tuwunel_core::Result;πuse tuwunel_core::err;πpub use self::Count as PduCount;pub use self::Id as PduId;pub use self::Pdu as PduEvent;pub use self::RawId as RawPduId;pub use self::builder::Builder;pub use self::builder::Builder as PduBuilder;pub use self::count::Count;pub use self::format::check::check_room_id;pub use self::format::check::check_rules;pub use self::format::from_incoming_federation;pub use self::format::into_outgoing_federation;pub use self::hashes::EventHashes as EventHash;pub use self::id::Id;pub use self::unsigned::DELAY_ID;pub use self::unsigned::PRIVATE as PRIVATE_UNSIGNED;use super::Event;πuse super::ShortRoomId;πuse super::StateKey;πpub use self::raw_id::*;
ModulesΒ§
StructsΒ§
- Pdu
- Stores a Matrix persistent data unit in typed form.
- RawId
Visitor
EnumsΒ§
- RawId
- Packed database key for a roomβs normal or backfilled PDU.
ConstantsΒ§
- INT_LEN
- MAX_
AUTH_ EVENTS - The [maximum length allowed] for the
auth_eventsarray of a PDU. [maximum length allowed]: https://spec.matrix.org/latest/rooms/v1/#event-format - MAX_
PDU_ BYTES - The [maximum size allowed] for a PDU. [maximum size allowed]: https://spec.matrix.org/latest/client-server-api/#size-limits
- MAX_
PREV_ EVENTS - The maximum length allowed for the
prev_eventsarray of a PDU.
Type AliasesΒ§
- Auth
Events - Inline storage for the typical three-entry
auth_eventscase. - Content
- Raw event-content storage with 112 bytes of inline capacity.
- Prev
Events - Inline storage for the common single-entry
prev_eventscase. - RawId
Backfilled - RawId
Normal - Unsigned
- Raw
unsignedstorage with 112 bytes of inline capacity.