Trait ruma::events::EventContent[][src]

pub trait EventContent: Serialize {
    fn event_type(&self) -> &str;
fn from_parts(event_type: &str, content: &RawValue) -> Result<Self, Error>; }
This is supported on crate feature events only.
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