Skip to main content

Module state_accessor

Module state_accessor 

Source
Expand description

Reads room-state snapshots and evaluates state-based access policy.

The service resolves current and historical state into typed events. It also centralizes visibility, redaction, erasure, invite, and tombstone decisions.

Re-exportsยง

use std::sync::Arc; ๐Ÿ”’
use async_trait::async_trait; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::TryFutureExt; ๐Ÿ”’
use futures::future::try_join; ๐Ÿ”’
use ruma::EventEncryptionAlgorithm; ๐Ÿ”’
use ruma::OwnedRoomAliasId; ๐Ÿ”’
use ruma::RoomId; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use ruma::events::StateEventType; ๐Ÿ”’
use ruma::events::room::avatar::RoomAvatarEventContent; ๐Ÿ”’
use ruma::events::room::canonical_alias::RoomCanonicalAliasEventContent; ๐Ÿ”’
use ruma::events::room::create::RoomCreateEventContent; ๐Ÿ”’
use ruma::events::room::encryption::RoomEncryptionEventContent; ๐Ÿ”’
use ruma::events::room::guest_access::GuestAccess; ๐Ÿ”’
use ruma::events::room::guest_access::RoomGuestAccessEventContent; ๐Ÿ”’
use ruma::events::room::history_visibility::HistoryVisibility; ๐Ÿ”’
use ruma::events::room::join_rules::JoinRule; ๐Ÿ”’
use ruma::events::room::join_rules::RoomJoinRulesEventContent; ๐Ÿ”’
use ruma::events::room::member::RoomMemberEventContent; ๐Ÿ”’
use ruma::events::room::name::RoomNameEventContent; ๐Ÿ”’
use ruma::events::room::power_levels::RoomPowerLevels; ๐Ÿ”’
use ruma::events::room::power_levels::RoomPowerLevelsEventContent; ๐Ÿ”’
use ruma::events::room::topic::RoomTopicEventContent; ๐Ÿ”’
use ruma::room::RoomType; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::utils::BoolExt; ๐Ÿ”’
use tuwunel_core::utils::OptionExt; ๐Ÿ”’
use tuwunel_matrix::Event; ๐Ÿ”’
use tuwunel_matrix::Pdu; ๐Ÿ”’
use tuwunel_matrix::room::state::resolution::events::RoomCreateEvent; ๐Ÿ”’
use tuwunel_matrix::room_version; ๐Ÿ”’
use crate::rooms::state_compressor::CompressedState; ๐Ÿ”’
use crate::rooms::timeline::Mapped; ๐Ÿ”’

Modulesยง

checked ๐Ÿ”’
Check-only reads of room state.
erased ๐Ÿ”’
Applies sender-erasure pruning to client and federation event views.
room_state ๐Ÿ”’
Resolves the current state snapshot for a room.
server_can ๐Ÿ”’
Evaluates federation visibility against historical room state.
state ๐Ÿ”’
Reads events and short IDs from a historical room-state snapshot.
user_can ๐Ÿ”’
Evaluates user visibility and event-authoring permissions.

Structsยง

Service
Resolves room state and answers state-based authorization questions.

Functionsยง

plain_text_topic ๐Ÿ”’
Resolves room-topic content to a non-empty plain-text rendering.