Struct ruma_events::room::redaction::OriginalRoomRedactionEvent
source · pub struct OriginalRoomRedactionEvent {
pub content: RoomRedactionEventContent,
pub redacts: Option<OwnedEventId>,
pub event_id: OwnedEventId,
pub sender: OwnedUserId,
pub origin_server_ts: MilliSecondsSinceUnixEpoch,
pub room_id: OwnedRoomId,
pub unsigned: RoomRedactionUnsigned,
}
Expand description
Redaction event.
Fields§
§content: RoomRedactionEventContent
Data specific to the event type.
redacts: Option<OwnedEventId>
The ID of the event that was redacted.
This field is required in room versions prior to 11.
event_id: OwnedEventId
The globally unique event identifier for the user who sent the event.
sender: OwnedUserId
The fully-qualified ID of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpoch
Timestamp in milliseconds on originating homeserver when this event was sent.
room_id: OwnedRoomId
The ID of the room associated with this event.
unsigned: RoomRedactionUnsigned
Additional key-value pairs not signed by the homeserver.
Implementations§
source§impl OriginalRoomRedactionEvent
impl OriginalRoomRedactionEvent
sourcepub fn redacts(&self, room_version: &RoomVersionId) -> &EventId
pub fn redacts(&self, room_version: &RoomVersionId) -> &EventId
Returns the ID of the event that this event redacts, according to the proper redacts
field
for the given room version.
If the redacts
field is not the proper one for the given room version, this falls back to
the one that is available.
§Panics
Panics if both redacts
field are None
, which is only possible if the event was modified
after being deserialized.
Trait Implementations§
source§impl Clone for OriginalRoomRedactionEvent
impl Clone for OriginalRoomRedactionEvent
source§fn clone(&self) -> OriginalRoomRedactionEvent
fn clone(&self) -> OriginalRoomRedactionEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OriginalRoomRedactionEvent
impl Debug for OriginalRoomRedactionEvent
source§impl<'de> Deserialize<'de> for OriginalRoomRedactionEvent
impl<'de> Deserialize<'de> for OriginalRoomRedactionEvent
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>,
source§impl From<OriginalRoomRedactionEvent> for OriginalSyncRoomRedactionEvent
impl From<OriginalRoomRedactionEvent> for OriginalSyncRoomRedactionEvent
source§fn from(value: OriginalRoomRedactionEvent) -> Self
fn from(value: OriginalRoomRedactionEvent) -> Self
impl RedactionEvent for OriginalRoomRedactionEvent
Auto Trait Implementations§
impl Freeze for OriginalRoomRedactionEvent
impl RefUnwindSafe for OriginalRoomRedactionEvent
impl Send for OriginalRoomRedactionEvent
impl Sync for OriginalRoomRedactionEvent
impl Unpin for OriginalRoomRedactionEvent
impl UnwindSafe for OriginalRoomRedactionEvent
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
)