Expand description
Stores room state snapshots and tracks each roomβs forward extremities.
The service associates events with compressed state hashes and replays derived cache effects when state is forced. State snapshots themselves are encoded and reconstructed by the state compressor service.
Re-exportsΒ§
use std::collections::HashMap;πuse std::fmt::Write;πuse std::iter::once;πuse std::ops::Bound::Excluded;πuse std::ops::Bound::Unbounded;πuse std::sync::Arc;πuse async_trait::async_trait;πpub(crate) use fetch_state::IdMapState;πuse futures::FutureExt;πuse futures::Stream;πuse futures::StreamExt;πuse futures::TryFutureExt;πuse futures::TryStreamExt;πuse futures::future::join_all;πpub(crate) use prune::prune_goal;πpub use prune::PruneSummary;pub use prune::Trigger;use ruma::CanonicalJsonObject;πuse ruma::EventId;πuse ruma::OwnedEventId;πuse ruma::OwnedRoomId;πuse ruma::RoomId;πuse ruma::RoomVersionId;πuse ruma::UserId;πuse ruma::events::AnyStrippedStateEvent;πuse ruma::events::StateEventType;πuse ruma::events::TimelineEventType;πuse ruma::events::room::create::RoomCreateEventContent;πuse ruma::events::room::member::MembershipState;πuse ruma::events::room::member::RoomMemberEventContent;πuse ruma::room_version_rules::AuthorizationRules;πuse ruma::serde::Raw;πuse serde::Deserialize;πuse serde::Deserialize;πuse serde_json::value::RawValue as RawJsonValue;πuse tuwunel_core::Error;πuse tuwunel_core::Result;πuse tuwunel_core::err;πuse tuwunel_core::error::inspect_debug_log;πuse tuwunel_core::implement;πuse tuwunel_core::result::AndThenRef;πuse tuwunel_core::result::FlatOk;πuse tuwunel_core::result::NotFound;πuse tuwunel_core::smallvec::SmallVec;πuse tuwunel_core::trace;πuse tuwunel_core::utils::BoolExt;πuse tuwunel_core::utils::IterStream;πuse tuwunel_core::utils::MutexMap;πuse tuwunel_core::utils::MutexMapGuard;πuse tuwunel_core::utils::ReadyExt;πuse tuwunel_core::utils::TryFutureExtExt;πuse tuwunel_core::utils::TryReadyExt;πuse tuwunel_core::utils::calculate_hash;πuse tuwunel_core::utils::hash::sha256::Digest;πuse tuwunel_core::utils::mutex_map::Guard;πuse tuwunel_core::utils::stream::TryBroadbandExt;πuse tuwunel_core::utils::stream::TryIgnore;πuse tuwunel_core::utils::stream::WidebandExt;πuse tuwunel_core::warn;πuse tuwunel_database::Deserialized;πuse tuwunel_database::Ignore;πuse tuwunel_database::Interfix;πuse tuwunel_database::Map;πuse tuwunel_database::Txn;πuse tuwunel_matrix::Event;πuse tuwunel_matrix::PduCount;πuse tuwunel_matrix::PduEvent;πuse tuwunel_matrix::RoomVersionRules;πuse tuwunel_matrix::StateKey;πuse tuwunel_matrix::TypeStateKey;πuse tuwunel_matrix::room::state::resolution::StateMap;πuse tuwunel_matrix::room::state::resolution::auth_types_for_event;πuse tuwunel_matrix::room_version;πuse crate::integrity::undecodable;πuse crate::rooms::short::ShortEventId;πuse crate::rooms::short::ShortStateHash;πuse crate::rooms::short::ShortStateKey;πuse crate::rooms::state_cache::MembershipUpdate;πuse crate::rooms::state_cache::StrippedRoomState;πuse crate::rooms::state_compressor::CompressedState;πuse crate::rooms::state_compressor::CompressedStateEvent;πuse crate::rooms::state_compressor::ShortStateInfo;πuse crate::rooms::state_compressor::compress_state_event;πuse crate::rooms::state_compressor::parse_compressed_state_event;πuse crate::rooms::timeline::Mapped;πuse crate::services::OnceServices;π
ModulesΒ§
- fetch_
state π - prune π
- Selects a bounded set of useful room forward extremities.
StructsΒ§
- Create
Event π - Data π
- Service
- Manages current room state, event state snapshots, and forward extremities.
FunctionsΒ§
- summary_
cells π - The room state cells a membership eventβs summary recommends.
- summary_
event_ πid - unreadable_
summary_ πevent - version_
absent π - Whether a failed read on the way to a roomβs version leaves a check with no version rather than with that failure.
Type AliasesΒ§
- Forward
Extremities π - Room
Mutex Guard - Guard proving exclusive access to a roomβs state mutation path.
- Room
Mutex πMap - Summary
Cell π