pub enum MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,{
Original(OriginalMessageLikeEvent<C>),
Redacted(RedactedMessageLikeEvent<<C as RedactContent>::Redacted>),
}
Available on crate feature
events
only.Expand description
A possibly-redacted message-like event.
MessageLikeEvent
implements the comparison traits using only the event_id
field, a sorted
list would be sorted lexicographically based on the event’s EventId
.
Variants§
Original(OriginalMessageLikeEvent<C>)
Original, unredacted form of the event.
Redacted(RedactedMessageLikeEvent<<C as RedactContent>::Redacted>)
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
Source§impl From<MessageLikeEvent<AudioEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3927
only.
impl From<MessageLikeEvent<AudioEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3927
only.Source§fn from(c: MessageLikeEvent<AudioEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<AudioEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<BeaconEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3489
only.
impl From<MessageLikeEvent<BeaconEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3489
only.Source§fn from(c: MessageLikeEvent<BeaconEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<BeaconEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
Source§fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallAnswerEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallAnswerEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallAnswerEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallAnswerEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallCandidatesEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallCandidatesEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallCandidatesEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallCandidatesEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallHangupEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallHangupEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallHangupEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallHangupEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallInviteEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallInviteEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallInviteEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallInviteEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallNegotiateEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallNegotiateEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallNegotiateEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallNegotiateEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallNotifyEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc4075
only.
impl From<MessageLikeEvent<CallNotifyEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc4075
only.Source§fn from(c: MessageLikeEvent<CallNotifyEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallNotifyEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallRejectEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallRejectEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<CallRejectEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<CallRejectEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallSdpStreamMetadataChangedEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallSdpStreamMetadataChangedEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<CallSdpStreamMetadataChangedEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<CallSdpStreamMetadataChangedEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<CallSelectAnswerEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallSelectAnswerEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<CallSelectAnswerEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<CallSelectAnswerEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<EmoteEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3954
only.
impl From<MessageLikeEvent<EmoteEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3954
only.Source§fn from(c: MessageLikeEvent<EmoteEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<EmoteEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<EncryptedEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3956
only.
impl From<MessageLikeEvent<EncryptedEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3956
only.Source§fn from(c: MessageLikeEvent<EncryptedEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<EncryptedEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<FileEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3551
only.
impl From<MessageLikeEvent<FileEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3551
only.Source§fn from(c: MessageLikeEvent<FileEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<FileEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<ImageEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3552
only.
impl From<MessageLikeEvent<ImageEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3552
only.Source§fn from(c: MessageLikeEvent<ImageEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<ImageEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationAcceptEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationAcceptEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationAcceptEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationAcceptEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationCancelEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationCancelEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationCancelEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationCancelEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationDoneEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationDoneEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationDoneEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationDoneEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationKeyEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationKeyEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationKeyEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationKeyEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationMacEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationMacEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationMacEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationMacEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationReadyEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationReadyEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationReadyEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationReadyEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<KeyVerificationStartEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationStartEventContent>> for AnyMessageLikeEvent
Source§fn from(
c: MessageLikeEvent<KeyVerificationStartEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<KeyVerificationStartEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<LocationEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3488
only.
impl From<MessageLikeEvent<LocationEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3488
only.Source§fn from(c: MessageLikeEvent<LocationEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<LocationEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<MessageEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc1767
only.
impl From<MessageLikeEvent<MessageEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc1767
only.Source§fn from(c: MessageLikeEvent<MessageEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<MessageEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<PollEndEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<PollEndEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(c: MessageLikeEvent<PollEndEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<PollEndEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<PollResponseEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<PollResponseEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(c: MessageLikeEvent<PollResponseEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<PollResponseEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<PollStartEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<PollStartEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(c: MessageLikeEvent<PollStartEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<PollStartEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<ReactionEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<ReactionEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<RoomEncryptedEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<RoomEncryptedEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<RoomEncryptedEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<RoomEncryptedEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<RoomMessageEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<RoomMessageEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<RoomMessageEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<RoomMessageEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<StickerEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<StickerEventContent>> for AnyMessageLikeEvent
Source§fn from(c: MessageLikeEvent<StickerEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<StickerEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<UnstablePollEndEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<UnstablePollEndEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(c: MessageLikeEvent<UnstablePollEndEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<UnstablePollEndEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<UnstablePollResponseEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<UnstablePollResponseEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(
c: MessageLikeEvent<UnstablePollResponseEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<UnstablePollResponseEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<UnstablePollStartEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<MessageLikeEvent<UnstablePollStartEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3381
only.Source§fn from(
c: MessageLikeEvent<UnstablePollStartEventContent>,
) -> AnyMessageLikeEvent
fn from( c: MessageLikeEvent<UnstablePollStartEventContent>, ) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<VideoEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3553
only.
impl From<MessageLikeEvent<VideoEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3553
only.Source§fn from(c: MessageLikeEvent<VideoEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<VideoEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Source§impl From<MessageLikeEvent<VoiceEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3245
only.
impl From<MessageLikeEvent<VoiceEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3245
only.Source§fn from(c: MessageLikeEvent<VoiceEventContent>) -> AnyMessageLikeEvent
fn from(c: MessageLikeEvent<VoiceEventContent>) -> AnyMessageLikeEvent
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for MessageLikeEvent<C>
impl<C> RefUnwindSafe for MessageLikeEvent<C>
impl<C> Send for MessageLikeEvent<C>
impl<C> Sync for MessageLikeEvent<C>
impl<C> Unpin for MessageLikeEvent<C>
impl<C> UnwindSafe for MessageLikeEvent<C>
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
Mutably borrows from an owned value. Read more