pub struct PduCommon {
pub(crate) event_id: OwnedEventId,
pub(crate) room_id: OwnedRoomId,
pub(crate) sender: OwnedUserId,
pub(crate) event_type: TimelineEventType,
pub(crate) content: Box<RawValue>,
pub(crate) state_key: Option<String>,
pub(crate) origin_server_ts: MilliSecondsSinceUnixEpoch,
pub(crate) redacts: Option<OwnedEventId>,
pub(crate) rejected: bool,
pub(crate) raw: Box<RawValue>,
}Expand description
Common PDU fields independent of room version format.
Fields§
§event_id: OwnedEventIdEvent ID.
room_id: OwnedRoomIdRoom ID.
sender: OwnedUserIdEvent sender.
event_type: TimelineEventTypeEvent type.
content: Box<RawValue>Event content.
state_key: Option<String>State key for state events.
origin_server_ts: MilliSecondsSinceUnixEpochOrigin server timestamp.
redacts: Option<OwnedEventId>Redacted event ID.
rejected: boolWhether the event is rejected.
raw: Box<RawValue>Raw PDU JSON.
Implementations§
Source§impl PduCommon
impl PduCommon
Sourcepub const fn event_type(&self) -> &TimelineEventType
pub const fn event_type(&self) -> &TimelineEventType
Get the event type
Sourcepub fn content(&self) -> &RawJsonValue
pub fn content(&self) -> &RawJsonValue
Get the event content
Sourcepub const fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub const fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Get the origin server timestamp
Sourcepub fn raw(&self) -> &RawJsonValue
pub fn raw(&self) -> &RawJsonValue
Get the raw PDU JSON
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PduCommon
impl RefUnwindSafe for PduCommon
impl Send for PduCommon
impl Sync for PduCommon
impl Unpin for PduCommon
impl UnsafeUnpin for PduCommon
impl UnwindSafe for PduCommon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more