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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)