Trait ruma_events::EventContent[][src]

pub trait EventContent: Sized + Serialize {
    fn event_type(&self) -> &str;
fn from_parts(event_type: &str, content: &RawJsonValue) -> Result<Self>; }
Expand description

The base trait that all event content types implement.

Implementing this trait allows content types to be serialized as well as deserialized.

Required methods

A matrix event identifier, like m.room.message.

Constructs the given event content.

Implementors