git-subtree-dir: ruma-events git-subtree-mainline: d59a616e2c363507a89c92f34aa67e86ee2cfb49 git-subtree-split: 00692d532e26f58d48ead9589dc823403c6e59a5
18 lines
506 B
Rust
18 lines
506 B
Rust
//! Types for the *m.room.topic* event.
|
|
|
|
use ruma_events_macros::StateEventContent;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::StateEvent;
|
|
|
|
/// A topic is a short message detailing what is currently being discussed in the room.
|
|
pub type TopicEvent = StateEvent<TopicEventContent>;
|
|
|
|
/// The payload for `TopicEvent`.
|
|
#[derive(Clone, Debug, Deserialize, Serialize, StateEventContent)]
|
|
#[ruma_event(type = "m.room.topic")]
|
|
pub struct TopicEventContent {
|
|
/// The topic text.
|
|
pub topic: String,
|
|
}
|