logo
pub trait EventContent: Serialize {
    type EventType;

    fn event_type(&self) -> Self::EventType;
}
Available on crate feature events only.
Expand description

The base trait that all event content types implement.

Use macros::EventContent to derive this traits. It is not meant to be implemented manually.

Required Associated Types

The Rust enum for the event kind’s known types.

Required Methods

Get the event’s type, like m.room.message.

Implementors