#[non_exhaustive]pub struct OriginalSyncRoomRedactionEvent {
pub content: RoomRedactionEventContent,
pub redacts: Option<OwnedEventId>,
pub event_id: OwnedEventId,
pub sender: OwnedUserId,
pub origin_server_ts: MilliSecondsSinceUnixEpoch,
pub unsigned: RoomRedactionUnsigned,
}Expand description
Redaction event without a room_id.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.content: RoomRedactionEventContentData 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: OwnedEventIdThe globally unique event identifier for the user who sent the event.
sender: OwnedUserIdThe fully-qualified ID of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpochTimestamp in milliseconds on originating homeserver when this event was sent.
unsigned: RoomRedactionUnsignedAdditional key-value pairs not signed by the homeserver.
Implementations§
Source§impl OriginalSyncRoomRedactionEvent
impl OriginalSyncRoomRedactionEvent
Sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> OriginalRoomRedactionEvent
pub fn into_full_event(self, room_id: OwnedRoomId) -> OriginalRoomRedactionEvent
Convert this sync event into a full event, one with a room_id field.
Source§impl OriginalSyncRoomRedactionEvent
impl OriginalSyncRoomRedactionEvent
Sourcepub fn redacts(&self, rules: &RedactionRules) -> &EventId
pub fn redacts(&self, rules: &RedactionRules) -> &EventId
Returns the ID of the event that this event redacts, according to the proper redacts field
for the given redaction rules.
If the redacts field is not the proper one for the given rules, 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 OriginalSyncRoomRedactionEvent
impl Clone for OriginalSyncRoomRedactionEvent
Source§fn clone(&self) -> OriginalSyncRoomRedactionEvent
fn clone(&self) -> OriginalSyncRoomRedactionEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for OriginalSyncRoomRedactionEvent
impl<'de> Deserialize<'de> for OriginalSyncRoomRedactionEvent
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 JsonCastable<AnySyncMessageLikeEvent> for OriginalSyncRoomRedactionEvent
impl JsonCastable<AnySyncTimelineEvent> for OriginalSyncRoomRedactionEvent
impl JsonCastable<Map<String, Value>> for OriginalSyncRoomRedactionEvent
impl JsonCastable<OriginalSyncRoomRedactionEvent> for OriginalRoomRedactionEvent
impl JsonCastable<SyncRoomRedactionEvent> for OriginalSyncRoomRedactionEvent
impl RedactionEvent for OriginalSyncRoomRedactionEvent
canonical-json only.