Struct OriginalSyncRoomRedactionEvent
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§
§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.
unsigned: RoomRedactionUnsigned
Additional key-value pairs not signed by the homeserver.
Implementations§
§impl OriginalSyncRoomRedactionEvent
impl OriginalSyncRoomRedactionEvent
pub 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.
§impl OriginalSyncRoomRedactionEvent
impl OriginalSyncRoomRedactionEvent
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 OriginalSyncRoomRedactionEvent
impl Clone for OriginalSyncRoomRedactionEvent
§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 more§impl Debug for OriginalSyncRoomRedactionEvent
impl Debug for OriginalSyncRoomRedactionEvent
§impl<'de> Deserialize<'de> for OriginalSyncRoomRedactionEvent
impl<'de> Deserialize<'de> for OriginalSyncRoomRedactionEvent
§fn deserialize<D>(
deserializer: D,
) -> Result<OriginalSyncRoomRedactionEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OriginalSyncRoomRedactionEvent, <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<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
impl SyncEvent for OriginalSyncRoomRedactionEvent
Auto Trait Implementations§
impl Freeze for OriginalSyncRoomRedactionEvent
impl RefUnwindSafe for OriginalSyncRoomRedactionEvent
impl Send for OriginalSyncRoomRedactionEvent
impl Sync for OriginalSyncRoomRedactionEvent
impl Unpin for OriginalSyncRoomRedactionEvent
impl UnwindSafe for OriginalSyncRoomRedactionEvent
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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