Struct ruma_events::pdu::RoomV1Pdu
source · pub struct RoomV1Pdu {Show 14 fields
pub event_id: OwnedEventId,
pub room_id: OwnedRoomId,
pub sender: OwnedUserId,
pub origin_server_ts: MilliSecondsSinceUnixEpoch,
pub kind: TimelineEventType,
pub content: Box<RawValue>,
pub state_key: Option<String>,
pub prev_events: Vec<(OwnedEventId, EventHash)>,
pub depth: UInt,
pub auth_events: Vec<(OwnedEventId, EventHash)>,
pub redacts: Option<OwnedEventId>,
pub unsigned: BTreeMap<String, Box<RawValue>>,
pub hashes: EventHash,
pub signatures: BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, String>>,
}
Expand description
A ‘persistent data unit’ (event) for room versions 1 and 2.
Fields§
§event_id: OwnedEventId
Event ID for the PDU.
room_id: OwnedRoomId
The room this event belongs to.
sender: OwnedUserId
The user id of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpoch
Timestamp (milliseconds since the UNIX epoch) on originating homeserver of when this event was created.
kind: TimelineEventType
The event’s type.
content: Box<RawValue>
The event’s content.
state_key: Option<String>
A key that determines which piece of room state the event represents.
prev_events: Vec<(OwnedEventId, EventHash)>
Event IDs for the most recent events in the room that the homeserver was aware of when it created this event.
depth: UInt
The maximum depth of the prev_events
, plus one.
auth_events: Vec<(OwnedEventId, EventHash)>
Event IDs for the authorization events that would allow this event to be in the room.
redacts: Option<OwnedEventId>
For redaction events, the ID of the event being redacted.
unsigned: BTreeMap<String, Box<RawValue>>
Additional data added by the origin server but not covered by the signatures.
hashes: EventHash
Content hashes of the PDU.
signatures: BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, String>>
Signatures for the PDU.
Trait Implementations§
source§impl<'de> Deserialize<'de> for RoomV1Pdu
impl<'de> Deserialize<'de> for RoomV1Pdu
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RoomV1Pdu
impl RefUnwindSafe for RoomV1Pdu
impl Send for RoomV1Pdu
impl Sync for RoomV1Pdu
impl Unpin for RoomV1Pdu
impl UnwindSafe for RoomV1Pdu
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)