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
- Build the start of a PDU in order to add it to the Database.
- Event
Hash - Content hashes of a PDU.
- Id
- Pdu
- Persistent Data Unit (Event)
- PduBuilder
- Build the start of a PDU in order to add it to the Database.
Enumsยง
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 - 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 - into_
outgoing_ federation
Type Aliasesยง
- Auth
Events - Tuned auth_events vector. Average events have three auth events. It is debatable whether this could be an ArrayVec but the realistic upper-bound is too high and non-deterministic in the era of restricted-type rooms.
- Content
- Tuned content buffer. This was chosen empirically based on a significantly high-rate modality in the 96-112B size class reported by jemalloc. With two additional words (hopefully) for the SmallVec it puts us squarely at 128B.
- Prev
Events - Tuned prev_events vector. Most events have one prev_event. Many events have more but allocations for all of those cases still beats allocations for all cases.