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
fn event_type(&self) -> &str
fn event_type(&self) -> &str
A matrix event identifier, like m.room.message
.