[][src]Struct seshat::Event

pub struct Event {
    pub event_type: EventType,
    pub content_value: String,
    pub msgtype: Option<String>,
    pub event_id: String,
    pub sender: String,
    pub server_ts: i64,
    pub room_id: String,
    pub source: String,
}

Matrix event that can be added to the database.

Fields

event_type: EventType

The type of the event.

content_value: String

The textual representation of a message, this part of the event will be indexed.

msgtype: Option<String>

The type of the message if the event is of a m.room.message type.

event_id: String

The unique identifier of this event.

sender: String

The MXID of the user who sent this event.

server_ts: i64

Timestamp in milliseconds on the originating Homeserver when this event was sent.

room_id: String

The ID of the room associated with this event.

source: String

The serialized JSON string of the event. This string will be returned by a search later on.

Methods

impl Event[src]

pub fn new(
    event_type: EventType,
    content_value: &str,
    msgtype: Option<&str>,
    event_id: &str,
    sender: &str,
    server_ts: i64,
    room_id: &str,
    source: &str
) -> Event
[src]

Create a new event.

Arguments

  • event_type - The type of the event.
  • content_value - The plain text value of the content, body for a message event, topic for a topic event and name for a name event.
  • event_id - The unique identifier of the event.
  • sender - The unique identifier of the event author.
  • server_ts - The timestamp of the event.
  • room_id - The unique identifier of the room that the event belongs to.
  • source - The serialized version of the event.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

impl PartialEq<Event> for Event[src]

impl StructuralPartialEq 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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Erased for T

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

impl<T> Fruit for T where
    T: Send + Downcast, 
[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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