Struct OriginalRoomRedactionEvent
#[non_exhaustive]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 (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.
room_id: OwnedRoomIdThe ID of the room associated with this event.
unsigned: RoomRedactionUnsignedAdditional key-value pairs not signed by the homeserver.
Implementations§
§impl OriginalRoomRedactionEvent
impl OriginalRoomRedactionEvent
pub 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§
§impl Clone for OriginalRoomRedactionEvent
impl Clone for OriginalRoomRedactionEvent
§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 more§impl Debug for OriginalRoomRedactionEvent
impl Debug for OriginalRoomRedactionEvent
§impl<'de> Deserialize<'de> for OriginalRoomRedactionEvent
impl<'de> Deserialize<'de> for OriginalRoomRedactionEvent
§fn deserialize<D>(
deserializer: D,
) -> Result<OriginalRoomRedactionEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OriginalRoomRedactionEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl From<OriginalRoomRedactionEvent> for OriginalSyncRoomRedactionEvent
impl From<OriginalRoomRedactionEvent> for OriginalSyncRoomRedactionEvent
§fn from(value: OriginalRoomRedactionEvent) -> OriginalSyncRoomRedactionEvent
fn from(value: OriginalRoomRedactionEvent) -> OriginalSyncRoomRedactionEvent
impl JsonCastable<AnyMessageLikeEvent> for OriginalRoomRedactionEvent
impl JsonCastable<AnySyncMessageLikeEvent> for OriginalRoomRedactionEvent
impl JsonCastable<AnySyncTimelineEvent> for OriginalRoomRedactionEvent
impl JsonCastable<AnyTimelineEvent> for OriginalRoomRedactionEvent
impl JsonCastable<Map<String, Value>> for OriginalRoomRedactionEvent
impl JsonCastable<OriginalSyncRoomRedactionEvent> for OriginalRoomRedactionEvent
impl JsonCastable<RoomRedactionEvent> for OriginalRoomRedactionEvent
impl JsonCastable<SyncRoomRedactionEvent> for OriginalRoomRedactionEvent
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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