Enum ruma_common::events::MessageLikeEvent
source · pub enum MessageLikeEvent<C: MessageLikeEventContent + RedactContent>where
C::Redacted: RedactedMessageLikeEventContent,{
Original(OriginalMessageLikeEvent<C>),
Redacted(RedactedMessageLikeEvent<C::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::Redacted>)
Redacted form of the event with minimal fields.
Implementations§
source§impl<C> MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
C::Redacted: RedactedMessageLikeEventContent,
impl<C> MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
C::Redacted: RedactedMessageLikeEventContent,
sourcepub fn event_type(&self) -> MessageLikeEventType
pub fn event_type(&self) -> MessageLikeEventType
Returns the type of this event.
sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts field.
sourcepub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
pub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
Get the inner OriginalMessageLikeEvent if this is an unredacted event.
Trait Implementations§
source§impl<C: Clone + MessageLikeEventContent + RedactContent> Clone for MessageLikeEvent<C>where
C::Redacted: RedactedMessageLikeEventContent + Clone,
impl<C: Clone + MessageLikeEventContent + RedactContent> Clone for MessageLikeEvent<C>where
C::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 + MessageLikeEventContent + RedactContent> Debug for MessageLikeEvent<C>where
C::Redacted: RedactedMessageLikeEventContent + Debug,
impl<C: Debug + MessageLikeEventContent + RedactContent> Debug for MessageLikeEvent<C>where
C::Redacted: RedactedMessageLikeEventContent + Debug,
source§impl<'de, C> Deserialize<'de> for MessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
impl<'de, C> Deserialize<'de> for MessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<MessageLikeEvent<AudioEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc3246 only.
impl From<MessageLikeEvent<AudioEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc3246 only.source§fn from(c: AudioEvent) -> Self
fn from(c: AudioEvent) -> Self
Converts to this type from the input type.
source§impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
C::Redacted: RedactedMessageLikeEventContent,
impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
C::Redacted: RedactedMessageLikeEventContent,
source§fn from(full: MessageLikeEvent<C>) -> Self
fn from(full: MessageLikeEvent<C>) -> Self
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: CallAnswerEvent) -> Self
fn from(c: CallAnswerEvent) -> Self
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: CallCandidatesEvent) -> Self
fn from(c: CallCandidatesEvent) -> Self
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: CallHangupEvent) -> Self
fn from(c: CallHangupEvent) -> Self
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: CallInviteEvent) -> Self
fn from(c: CallInviteEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<CallNegotiateEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc2746 only.
impl From<MessageLikeEvent<CallNegotiateEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc2746 only.source§fn from(c: CallNegotiateEvent) -> Self
fn from(c: CallNegotiateEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<CallRejectEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc2746 only.
impl From<MessageLikeEvent<CallRejectEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc2746 only.source§fn from(c: CallRejectEvent) -> Self
fn from(c: CallRejectEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<CallSelectAnswerEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc2746 only.
impl From<MessageLikeEvent<CallSelectAnswerEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc2746 only.source§fn from(c: CallSelectAnswerEvent) -> Self
fn from(c: CallSelectAnswerEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<EmoteEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc1767 only.
impl From<MessageLikeEvent<EmoteEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc1767 only.source§fn from(c: EmoteEvent) -> Self
fn from(c: EmoteEvent) -> Self
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§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: ImageEvent) -> Self
fn from(c: ImageEvent) -> Self
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: KeyVerificationAcceptEvent) -> Self
fn from(c: KeyVerificationAcceptEvent) -> Self
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: KeyVerificationCancelEvent) -> Self
fn from(c: KeyVerificationCancelEvent) -> Self
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: KeyVerificationDoneEvent) -> Self
fn from(c: KeyVerificationDoneEvent) -> Self
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: KeyVerificationKeyEvent) -> Self
fn from(c: KeyVerificationKeyEvent) -> Self
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: KeyVerificationMacEvent) -> Self
fn from(c: KeyVerificationMacEvent) -> Self
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: KeyVerificationReadyEvent) -> Self
fn from(c: KeyVerificationReadyEvent) -> Self
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: KeyVerificationStartEvent) -> Self
fn from(c: KeyVerificationStartEvent) -> Self
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: LocationEvent) -> Self
fn from(c: LocationEvent) -> Self
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: MessageEvent) -> Self
fn from(c: MessageEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<NoticeEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc1767 only.
impl From<MessageLikeEvent<NoticeEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc1767 only.source§fn from(c: NoticeEvent) -> Self
fn from(c: NoticeEvent) -> Self
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: PollEndEvent) -> Self
fn from(c: PollEndEvent) -> Self
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: PollResponseEvent) -> Self
fn from(c: PollResponseEvent) -> Self
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: PollStartEvent) -> Self
fn from(c: PollStartEvent) -> Self
Converts to this type from the input type.
source§impl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
Available on crate feature unstable-msc2677 only.
impl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
Available on crate feature
unstable-msc2677 only.source§fn from(c: ReactionEvent) -> Self
fn from(c: ReactionEvent) -> Self
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: RoomEncryptedEvent) -> Self
fn from(c: RoomEncryptedEvent) -> Self
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: RoomMessageEvent) -> Self
fn from(c: RoomMessageEvent) -> Self
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: StickerEvent) -> Self
fn from(c: StickerEvent) -> Self
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: VideoEvent) -> Self
fn from(c: VideoEvent) -> Self
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: VoiceEvent) -> Self
fn from(c: VoiceEvent) -> Self
Converts to this type from the input type.