ruma_events/image_pack/
rooms.rs1use std::collections::BTreeMap;
4
5use ruma_common::OwnedRoomId;
6use ruma_macros::EventContent;
7use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Debug, Default, Deserialize, Serialize, EventContent)]
11#[cfg_attr(not(ruma_unstable_exhaustive_types), non_exhaustive)]
12#[ruma_event(type = "m.image_pack.rooms", kind = GlobalAccountData)]
13pub struct ImagePackRoomsEventContent {
14 pub rooms: BTreeMap<OwnedRoomId, BTreeMap<String, RoomImagePackMeta>>,
19}
20
21impl ImagePackRoomsEventContent {
22 pub fn new(rooms: BTreeMap<OwnedRoomId, BTreeMap<String, RoomImagePackMeta>>) -> Self {
25 Self { rooms }
26 }
27}
28
29#[derive(Clone, Debug, Default, Deserialize, Serialize)]
33#[cfg_attr(not(ruma_unstable_exhaustive_types), non_exhaustive)]
34pub struct RoomImagePackMeta {}
35
36impl RoomImagePackMeta {
37 pub fn new() -> Self {
39 Self {}
40 }
41}