Trait ruma_state_res::Event
source · pub trait Event {
type Id: Clone + Debug + Display + Eq + Ord + Hash + Borrow<EventId>;
// Required methods
fn event_id(&self) -> &Self::Id;
fn room_id(&self) -> &RoomId;
fn sender(&self) -> &UserId;
fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch;
fn event_type(&self) -> &TimelineEventType;
fn content(&self) -> &RawJsonValue;
fn state_key(&self) -> Option<&str>;
fn prev_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>;
fn auth_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>;
fn redacts(&self) -> Option<&Self::Id>;
}
Expand description
Abstraction of a PDU so users can have their own PDU types.
Required Associated Types§
Required Methods§
sourcefn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
The time of creation on the originating server.
sourcefn event_type(&self) -> &TimelineEventType
fn event_type(&self) -> &TimelineEventType
The event type.
sourcefn content(&self) -> &RawJsonValue
fn content(&self) -> &RawJsonValue
The event’s content.
sourcefn prev_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>
fn prev_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>
The events before this event.
sourcefn auth_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>
fn auth_events(&self) -> Box<dyn DoubleEndedIterator<Item = &Self::Id> + '_>
All the authenticating events for this event.