matrix_sdk_base/response_processors/
mod.rs

1// Copyright 2025 The Matrix.org Foundation C.I.C.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub mod account_data;
16pub mod changes;
17#[cfg(feature = "e2e-encryption")]
18pub mod e2ee;
19pub mod ephemeral_events;
20#[cfg(feature = "e2e-encryption")]
21pub mod latest_event;
22pub mod notification;
23pub mod profiles;
24pub mod room;
25pub mod state_events;
26pub mod timeline;
27#[cfg(feature = "e2e-encryption")]
28pub mod verification;
29
30use std::collections::BTreeMap;
31
32use ruma::OwnedRoomId;
33
34use crate::{RoomInfoNotableUpdateReasons, StateChanges};
35
36type RoomInfoNotableUpdates = BTreeMap<OwnedRoomId, RoomInfoNotableUpdateReasons>;
37
38#[cfg_attr(test, derive(Clone))]
39#[derive(Default)]
40pub(crate) struct Context {
41    pub(super) state_changes: StateChanges,
42    pub(super) room_info_notable_updates: RoomInfoNotableUpdates,
43}
44
45impl Context {
46    pub fn new(state_changes: StateChanges) -> Self {
47        Self { state_changes, room_info_notable_updates: Default::default() }
48    }
49}