Enum matrix_sdk::ruma::events::SyncMessageLikeEvent
source · pub enum SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,{
Original(OriginalSyncMessageLikeEvent<C>),
Redacted(RedactedSyncMessageLikeEvent<<C as RedactContent>::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 as RedactContent>::Redacted>)
Redacted form of the event with minimal fields.
Implementations§
source§impl<C> SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C> SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::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<&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 for SyncMessageLikeEvent<C>where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Clone,
impl<C> Clone for SyncMessageLikeEvent<C>where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Clone,
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 for SyncMessageLikeEvent<C>where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Debug,
impl<C> Debug for SyncMessageLikeEvent<C>where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + Debug,
source§impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent + EventContentFromType,
source§fn deserialize<D>(
deserializer: D,
) -> Result<SyncMessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SyncMessageLikeEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<SyncMessageLikeEvent<BeaconEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<BeaconEventContent>> for AnySyncMessageLikeEvent
source§fn from(c: SyncMessageLikeEvent<BeaconEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<BeaconEventContent>) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallAnswerEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallAnswerEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallCandidatesEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallCandidatesEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallHangupEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallHangupEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallInviteEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallInviteEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallNegotiateEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallNegotiateEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallNotifyEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallNotifyEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallRejectEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallRejectEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<CallSelectAnswerEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallSelectAnswerEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationAcceptEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationAcceptEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationCancelEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationCancelEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationDoneEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationDoneEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationKeyEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationKeyEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationMacEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationMacEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationReadyEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationReadyEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<KeyVerificationStartEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationStartEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<LocationEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<LocationEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<MessageEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<MessageEventContent>) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<PollEndEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<PollEndEventContent>) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<PollResponseEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<PollResponseEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<PollStartEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<PollStartEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<ReactionEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<ReactionEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<RoomEncryptedEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<RoomEncryptedEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<RoomMessageEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<RoomMessageEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<UnstablePollEndEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollEndEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<UnstablePollResponseEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollResponseEventContent>, ) -> AnySyncMessageLikeEvent
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: SyncMessageLikeEvent<UnstablePollStartEventContent>,
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollStartEventContent>, ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
impl<C> SyncEvent for SyncMessageLikeEvent<C>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more