Trait ruma_events::Event
[−]
[src]
pub trait Event: Debug + Deserialize + Serialize { type Content: Debug + Deserialize + Serialize; fn content(&self) -> &Self::Content; fn event_type(&self) -> &EventType; fn extra_content(&self) -> Option<Value> { ... } }
A basic event.
Associated Types
type Content: Debug + Deserialize + Serialize
The event-type-specific payload this event carries.
Required Methods
fn content(&self) -> &Self::Content
The event's content.
fn event_type(&self) -> &EventType
The type of the event.
Provided Methods
fn extra_content(&self) -> Option<Value>
Extra top-level key-value pairs specific to this event type, but that are not under the
content
field.
Implementors
impl Event for AnswerEvent
impl Event for CandidatesEvent
impl Event for HangupEvent
impl Event for InviteEvent
impl Event for PresenceEvent
impl Event for ReceiptEvent
impl Event for AliasesEvent
impl Event for AvatarEvent
impl Event for CanonicalAliasEvent
impl Event for CreateEvent
impl Event for GuestAccessEvent
impl Event for HistoryVisibilityEvent
impl Event for JoinRulesEvent
impl Event for MemberEvent
impl Event for MessageEvent
impl Event for NameEvent
impl Event for PowerLevelsEvent
impl Event for RedactionEvent
impl Event for ThirdPartyInviteEvent
impl Event for TopicEvent
impl Event for TagEvent
impl Event for TypingEvent
impl Event for CustomEvent
impl Event for CustomRoomEvent
impl Event for CustomStateEvent