logo
pub struct RoomV3Pdu {
Show 13 fields pub room_id: OwnedRoomId, pub sender: OwnedUserId, pub origin_server_ts: MilliSecondsSinceUnixEpoch, pub kind: RoomEventType, pub content: Box<RawJsonValue>, pub state_key: Option<String>, pub prev_events: Vec<OwnedEventId>, pub depth: UInt, pub auth_events: Vec<OwnedEventId>, pub redacts: Option<OwnedEventId>, pub unsigned: BTreeMap<String, Box<RawJsonValue>>, pub hashes: EventHash, pub signatures: BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, String>>,
}
Available on crate features events and unstable-pdu only.
Expand description

A ‘persistent data unit’ (event) for room versions 3 and beyond.

Fields

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: RoomEventType

The event’s type.

content: Box<RawJsonValue>

The event’s content.

state_key: Option<String>

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

prev_events: Vec<OwnedEventId>

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>

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

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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more