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Β§
pub use self::Count as PduCount;pub use self::Id as PduId;pub use self::Pdu as PduEvent;pub use self::RawId as RawPduId;
ModulesΒ§
StructsΒ§
- Builder
- Collects the initial fields needed to build and append a PDU.
- Event
Hash - Content hashes of a PDU.
- Id
- Typed components of a PDU database key.
- Pdu
- Stores a Matrix persistent data unit in typed form.
- PduBuilder
- Collects the initial fields needed to build and append a PDU.
EnumsΒ§
- Count
- Sequence number locating a PDU in a room timeline.
- RawId
- Packed database key for a roomβs normal or backfilled PDU.
ConstantsΒ§
- 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. [maximum length allowed]: https://spec.matrix.org/latest/rooms/v1/#event-format
FunctionsΒ§
- check_
room_ id - Verifies that a parsed PDU belongs to the expected room.
- check_
rules - Check that the given canonicalized PDU respects the event format of the room version and the size limits from the Matrix specification.
- from_
incoming_ federation - Normalizes a federation PDU object into the stored representation.
- into_
outgoing_ federation - Converts a stored PDU object to its federation wire representation.
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. - Unsigned
- Raw
unsignedstorage with 112 bytes of inline capacity.