Expand description
User and room account data storage.
The service stores raw account data events behind monotonic update counters and maintains a secondary index by room, user, and event type. Its streams expose changes for incremental sync.
Re-exportsยง
use std::sync::Arc;๐use futures::Stream;๐use futures::StreamExt;๐use futures::TryFutureExt;๐use futures::pin_mut;๐use ruma::OwnedUserId;๐use ruma::RoomId;๐use ruma::UserId;๐use ruma::events::AnyGlobalAccountDataEvent;๐use ruma::events::AnyRawAccountDataEvent;๐use ruma::events::AnyRoomAccountDataEvent;๐use ruma::events::GlobalAccountDataEventType;๐use ruma::events::RoomAccountDataEventType;๐use ruma::push::RuleKind;๐use ruma::push::Ruleset;๐use ruma::serde::Raw;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde_json::json;๐use tuwunel_core::Err;๐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::ReadyExt;๐use tuwunel_core::utils::TryReadyExt;๐use tuwunel_core::utils::result::LogErr;๐use tuwunel_core::utils::stream::TryIgnore;๐use tuwunel_database::Deserialized;๐use tuwunel_database::Handle;๐use tuwunel_database::Ignore;๐use tuwunel_database::Interfix;๐use tuwunel_database::Json;๐use tuwunel_database::Map;๐
Modulesยง
- direct ๐
- Direct-room account data helpers.
- push_
rules ๐ - Room push-rule migration helpers.
- room_
tags ๐ - Room tag account data helpers.
Structsยง
Constantsยง
- MAX_
RULES - Maximum number of push rules one account may hold.
- MAX_
RULE_ BYTES - Largest match and action data stored for one rule, in bytes.
- MAX_
RULE_ ID_ BYTES - Longest rule ID stored, in bytes.
Functionsยง
- admits_
rule - Whether a ruleset has room for the rule with the given kind and ID.