pub enum SyncMessageLikeEvent<C: MessageLikeEventContent + RedactContent>where
C::Redacted: RedactedMessageLikeEventContent,{
Original(OriginalSyncMessageLikeEvent<C>),
Redacted(RedactedSyncMessageLikeEvent<C::Redacted>),
}
Expand description
A possibly-redacted message-like event without a room_id
.
SyncMessageLikeEvent
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(OriginalSyncMessageLikeEvent<C>)
Original, unredacted form of the event.
Redacted(RedactedSyncMessageLikeEvent<C::Redacted>)
Redacted form of the event with minimal fields.
Implementations§
Source§impl<C> SyncMessageLikeEvent<C>
impl<C> SyncMessageLikeEvent<C>
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<&OriginalSyncMessageLikeEvent<C>>
pub fn as_original(&self) -> Option<&OriginalSyncMessageLikeEvent<C>>
Get the inner OriginalSyncMessageLikeEvent
if this is an unredacted event.
Sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> MessageLikeEvent<C>
pub fn into_full_event(self, room_id: OwnedRoomId) -> MessageLikeEvent<C>
Convert this sync event into a full event (one with a room_id
field).
Trait Implementations§
Source§impl<C: Clone + MessageLikeEventContent + RedactContent> Clone for SyncMessageLikeEvent<C>
impl<C: Clone + MessageLikeEventContent + RedactContent> Clone for SyncMessageLikeEvent<C>
Source§fn clone(&self) -> SyncMessageLikeEvent<C>
fn clone(&self) -> SyncMessageLikeEvent<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 SyncMessageLikeEvent<C>
impl<C: Debug + MessageLikeEventContent + RedactContent> Debug for SyncMessageLikeEvent<C>
Source§impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C>
impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C>
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<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>
impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>
Source§fn from(full: MessageLikeEvent<C>) -> Self
fn from(full: MessageLikeEvent<C>) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<AudioEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<AudioEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncAudioEvent) -> Self
fn from(c: SyncAudioEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<BeaconEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<BeaconEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncBeaconEvent) -> Self
fn from(c: SyncBeaconEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallAnswerEvent) -> Self
fn from(c: SyncCallAnswerEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallCandidatesEvent) -> Self
fn from(c: SyncCallCandidatesEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallHangupEvent) -> Self
fn from(c: SyncCallHangupEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallInviteEvent) -> Self
fn from(c: SyncCallInviteEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallNegotiateEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallNegotiateEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallNegotiateEvent) -> Self
fn from(c: SyncCallNegotiateEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallNotifyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallNotifyEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallNotifyEvent) -> Self
fn from(c: SyncCallNotifyEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallRejectEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallRejectEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallRejectEvent) -> Self
fn from(c: SyncCallRejectEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallSdpStreamMetadataChangedEvent) -> Self
fn from(c: SyncCallSdpStreamMetadataChangedEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<CallSelectAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallSelectAnswerEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncCallSelectAnswerEvent) -> Self
fn from(c: SyncCallSelectAnswerEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<EmoteEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<EmoteEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncEmoteEvent) -> Self
fn from(c: SyncEmoteEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<EncryptedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<EncryptedEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncEncryptedEvent) -> Self
fn from(c: SyncEncryptedEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<FileEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<FileEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncFileEvent) -> Self
fn from(c: SyncFileEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<ImageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<ImageEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncImageEvent) -> Self
fn from(c: SyncImageEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationAcceptEvent) -> Self
fn from(c: SyncKeyVerificationAcceptEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationCancelEvent) -> Self
fn from(c: SyncKeyVerificationCancelEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationDoneEvent) -> Self
fn from(c: SyncKeyVerificationDoneEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationKeyEvent) -> Self
fn from(c: SyncKeyVerificationKeyEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationMacEvent) -> Self
fn from(c: SyncKeyVerificationMacEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationReadyEvent) -> Self
fn from(c: SyncKeyVerificationReadyEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncKeyVerificationStartEvent) -> Self
fn from(c: SyncKeyVerificationStartEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<LocationEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<LocationEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncLocationEvent) -> Self
fn from(c: SyncLocationEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<MessageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<MessageEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncMessageEvent) -> Self
fn from(c: SyncMessageEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<PollEndEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<PollEndEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncPollEndEvent) -> Self
fn from(c: SyncPollEndEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<PollResponseEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<PollResponseEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncPollResponseEvent) -> Self
fn from(c: SyncPollResponseEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<PollStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<PollStartEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncPollStartEvent) -> Self
fn from(c: SyncPollStartEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncReactionEvent) -> Self
fn from(c: SyncReactionEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncRoomEncryptedEvent) -> Self
fn from(c: SyncRoomEncryptedEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncRoomMessageEvent) -> Self
fn from(c: SyncRoomMessageEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncStickerEvent) -> Self
fn from(c: SyncStickerEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<UnstablePollEndEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<UnstablePollEndEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncUnstablePollEndEvent) -> Self
fn from(c: SyncUnstablePollEndEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<UnstablePollResponseEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<UnstablePollResponseEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncUnstablePollResponseEvent) -> Self
fn from(c: SyncUnstablePollResponseEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<UnstablePollStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<UnstablePollStartEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncUnstablePollStartEvent) -> Self
fn from(c: SyncUnstablePollStartEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<VideoEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<VideoEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncVideoEvent) -> Self
fn from(c: SyncVideoEvent) -> Self
Converts to this type from the input type.
Source§impl From<SyncMessageLikeEvent<VoiceEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<VoiceEventContent>> for AnySyncMessageLikeEvent
Source§fn from(c: SyncVoiceEvent) -> Self
fn from(c: SyncVoiceEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for SyncMessageLikeEvent<C>
impl<C> RefUnwindSafe for SyncMessageLikeEvent<C>
impl<C> Send for SyncMessageLikeEvent<C>
impl<C> Sync for SyncMessageLikeEvent<C>
impl<C> Unpin for SyncMessageLikeEvent<C>
impl<C> UnwindSafe for SyncMessageLikeEvent<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