[][src]Struct gm_types::events::Event

pub struct Event {
    pub content: Content,
    pub event_type: String,
    pub room_data: Option<RoomEventData>,
    pub state_data: Option<StateEventData>,
}

A Matrix event.

All communication in Matrix is expressed in the form of data objects called events. These are the fundamental building blocks common to the client-server, server-server and application-service APIs.

Fields

content: Content

Event content.

event_type: String

The type of this event.

This SHOULD be namespaced similar to Java package naming conventions, e.g. 'com.example.subdomain.event.type'

room_data: Option<RoomEventData>

If this event is a Room Event, this struct stores Room Event-specific fields.

state_data: Option<StateEventData>

If this event is a State Event, this struct stores Room Event-specific fields.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

impl<'de> Deserialize<'de> for Event[src]

impl Serialize for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.