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: Signatures<OwnedServerName, ServerSigningKeyVersion>,
}
events
and unstable-pdu
only.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: Signatures<OwnedServerName, ServerSigningKeyVersion>
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<RoomV1Pdu, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RoomV1Pdu, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for RoomV1Pdu
impl Serialize for RoomV1Pdu
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more