pub type ReactionEvent = MessageLikeEvent<ReactionEventContent>;
Available on crate feature
events
only.Expand description
An m.reaction
event.
Aliased Type§
enum ReactionEvent {
Original(OriginalMessageLikeEvent<ReactionEventContent>),
Redacted(RedactedMessageLikeEvent<RedactedReactionEventContent>),
}
Variants§
Original(OriginalMessageLikeEvent<ReactionEventContent>)
Original, unredacted form of the event.
Redacted(RedactedMessageLikeEvent<RedactedReactionEventContent>)
Redacted form of the event with minimal fields.
Implementations
Source§impl<C> MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C> MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
Sourcepub fn event_type(&self) -> MessageLikeEventType
Available on crate feature unstable-msc3927
only.
pub fn event_type(&self) -> MessageLikeEventType
unstable-msc3927
only.Returns the type
of this event.
Sourcepub fn event_id(&self) -> &EventId
Available on crate feature unstable-msc3927
only.
pub fn event_id(&self) -> &EventId
unstable-msc3927
only.Returns this event’s event_id
field.
Sourcepub fn sender(&self) -> &UserId
Available on crate feature unstable-msc3927
only.
pub fn sender(&self) -> &UserId
unstable-msc3927
only.Returns this event’s sender
field.
Sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Available on crate feature unstable-msc3927
only.
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
unstable-msc3927
only.Returns this event’s origin_server_ts
field.
Sourcepub fn room_id(&self) -> &RoomId
Available on crate feature unstable-msc3927
only.
pub fn room_id(&self) -> &RoomId
unstable-msc3927
only.Returns this event’s room_id
field.
Sourcepub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
Available on crate feature unstable-msc3927
only.
pub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
unstable-msc3927
only.Get the inner OriginalMessageLikeEvent
if this is an unredacted event.
Trait Implementations
Source§impl<C> Clone for MessageLikeEvent<C>where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Clone,
impl<C> Clone for MessageLikeEvent<C>where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Clone,
Source§fn clone(&self) -> MessageLikeEvent<C>
fn clone(&self) -> MessageLikeEvent<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C> Debug for MessageLikeEvent<C>where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Debug,
impl<C> Debug for MessageLikeEvent<C>where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Debug,
Source§impl<'de, C> Deserialize<'de> for MessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
impl<'de, C> Deserialize<'de> for MessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<MessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more