[][src]Struct ruma_events::custom::CustomStateEvent

pub struct CustomStateEvent {
    pub content: CustomStateEventContent,
    pub event_id: EventId,
    pub event_type: String,
    pub origin_server_ts: SystemTime,
    pub prev_content: Option<CustomStateEventContent>,
    pub room_id: Option<RoomId>,
    pub sender: UserId,
    pub state_key: String,
    pub unsigned: UnsignedData,
}

A custom state event not covered by the Matrix specification.

Fields

content: CustomStateEventContent

The event's content.

event_id: EventId

The unique identifier for the event.

event_type: String

The custom type of the event.

origin_server_ts: SystemTime

Time on originating homeserver when this event was sent.

prev_content: Option<CustomStateEventContent>

The previous content for this state key, if any.

room_id: Option<RoomId>

The unique identifier for the room associated with this event.

sender: UserId

The unique identifier for the user who sent this event.

state_key: String

A key that determines which piece of room state the event represents.

unsigned: UnsignedData

Additional key-value pairs not signed by the homeserver.

Trait Implementations

impl Clone for CustomStateEvent[src]

impl Debug for CustomStateEvent[src]

impl Event for CustomStateEvent[src]

type Content = CustomStateEventContent

The type of this event's content field.

fn content(&self) -> &Self::Content[src]

The event's content.

fn event_type(&self) -> EventType[src]

The type of the event.

impl From<CustomStateEvent> for Event[src]

impl From<CustomStateEvent> for RoomEvent[src]

impl From<CustomStateEvent> for StateEvent[src]

impl FromRaw for CustomStateEvent[src]

type Raw = CustomStateEvent

The raw type.

impl RoomEvent for CustomStateEvent[src]

fn event_id(&self) -> &EventId[src]

The unique identifier for the event.

fn origin_server_ts(&self) -> SystemTime[src]

Time on originating homeserver when this event was sent.

fn room_id(&self) -> Option<&RoomId>[src]

The unique identifier for the room associated with this event.

This can be None if the event came from a context where there is no ambiguity which room it belongs to, like a /sync response for example.

fn sender(&self) -> &UserId[src]

The unique identifier for the user who sent this event.

fn unsigned(&self) -> &UnsignedData[src]

Additional key-value pairs not signed by the homeserver.

impl Serialize for CustomStateEvent[src]

impl StateEvent for CustomStateEvent[src]

fn prev_content(&self) -> Option<&Self::Content>[src]

The previous content for this state key, if any.

fn state_key(&self) -> &str[src]

A key that determines which piece of room state the event represents.

Auto Trait Implementations

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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,