Expand description
Stores accepted room events, outliers, and their timeline indexes.
The service maps event IDs to per-room stream positions, presents events to users, and coordinates append, backfill, purge, and redaction operations. Timeline insertion is serialized by the innermost per-room lock.
Re-exportsΒ§
use std::fmt::Write;πuse std::sync::Arc;πuse async_trait::async_trait;πuse futures::FutureExt;πuse futures::StreamExt;πuse futures::TryFutureExt;πuse futures::TryStreamExt;πuse futures::future::Either;πuse futures::future::select;πuse futures::future::select_ok;πuse futures::future::try_join;πuse futures::pin_mut;πuse ruma::CanonicalJsonObject;πuse ruma::EventId;πuse ruma::MilliSecondsSinceUnixEpoch;πuse ruma::OwnedEventId;πuse ruma::OwnedRoomId;πuse ruma::RoomId;πuse ruma::UserId;πuse ruma::api::Direction;πuse ruma::events::room::encrypted::Relation;πuse ruma::signatures::Verified;πuse serde::Deserialize;πuse serde::Deserialize;πuse tuwunel_core::Err;πuse tuwunel_core::Error;πuse tuwunel_core::Result;πuse tuwunel_core::at;πuse tuwunel_core::err;πuse tuwunel_core::implement;πuse tuwunel_core::utils::MutexMap;πuse tuwunel_core::utils::MutexMapGuard;πuse tuwunel_core::utils::future::TryExtExt;πuse tuwunel_core::utils::result::LogErr;πuse tuwunel_core::utils::result::NotFound;πuse tuwunel_core::utils::stream::IterStream;πuse tuwunel_core::utils::stream::TryReadyExt;πuse tuwunel_core::warn;πuse tuwunel_database::Database;πuse tuwunel_database::Deserialized;πuse tuwunel_database::Json;πuse tuwunel_database::Map;πuse tuwunel_database::Txn;πuse tuwunel_matrix::ShortEventId;πuse tuwunel_matrix::pdu::PduCount;πuse tuwunel_matrix::pdu::PduEvent;πuse tuwunel_matrix::room::state::resolution::FetchEvent;πpub use self::build::Collision;pub use self::pdus::PdusIterItem;pub use self::pdus::bias_count;pub(crate) use self::append::Incoming;πpub(crate) use self::checked::Mapped;πpub(crate) use self::checked::Position;πpub(crate) use self::redact::Restoration;πuse crate::rooms::short::ShortRoomId;πuse crate::rooms::short::ShortStateHash;πuse crate::rooms::threads::RedactedRoot;π
ModulesΒ§
- append π
- Appends authenticated events to room timelines and applies their side effects.
- backfill π
- Retrieves older room history from federation and inserts validated events.
- build π
- Builds and appends locally authored room events.
- checked π
- Check-only reads of timeline events.
- create π
- Constructs and signs local room events without persisting them.
- pdus π
- Streams, indexes, and deletes accepted room timeline rows.
- purge π
- Selectively removes historical accepted events from a room timeline.
- redact π
- Replaces accepted timeline events with their room-version redacted form.
StructsΒ§
- Data π
- Extract
Body π - Extract
Event πId - Extract
Relates πTo - Extracts the relation carried by event content.
- Extract
Relates πToEvent Id - PduId
- Re-exports the typed and raw persistent timeline identifiers.
- Service
- Provides persistent event lookup, insertion, and room timeline traversal.
EnumsΒ§
- RawPdu
Id - Re-exports the typed and raw persistent timeline identifiers.
Type AliasesΒ§
- Room
Mutex Guard - Guard proving exclusive access to a roomβs timeline insertion path.
- Room
Mutex πMap