ruma_events/room/
topic.rs1use ruma_macros::EventContent;
6use serde::{Deserialize, Serialize};
7
8use crate::EmptyStateKey;
9
10#[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
14#[cfg_attr(not(ruma_unstable_exhaustive_types), non_exhaustive)]
15#[ruma_event(type = "m.room.topic", kind = State, state_key_type = EmptyStateKey)]
16pub struct RoomTopicEventContent {
17 pub topic: String,
19}
20
21impl RoomTopicEventContent {
22 pub fn new(topic: String) -> Self {
24 Self { topic }
25 }
26}