Enum matrix_sdk_base::ruma::events::MessageLikeEvent
source · pub enum MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,{
Original(OriginalMessageLikeEvent<C>),
Redacted(RedactedMessageLikeEvent<<C as RedactContent>::Redacted>),
}
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-msc3489
only.
pub fn event_type(&self) -> MessageLikeEventType
unstable-msc3489
only.Returns the type
of this event.
sourcepub fn event_id(&self) -> &EventId
Available on crate feature unstable-msc3489
only.
pub fn event_id(&self) -> &EventId
unstable-msc3489
only.Returns this event’s event_id
field.
sourcepub fn sender(&self) -> &UserId
Available on crate feature unstable-msc3489
only.
pub fn sender(&self) -> &UserId
unstable-msc3489
only.Returns this event’s sender
field.
sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Available on crate feature unstable-msc3489
only.
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
unstable-msc3489
only.Returns this event’s origin_server_ts
field.
sourcepub fn room_id(&self) -> &RoomId
Available on crate feature unstable-msc3489
only.
pub fn room_id(&self) -> &RoomId
unstable-msc3489
only.Returns this event’s room_id
field.
sourcepub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
Available on crate feature unstable-msc3489
only.
pub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
unstable-msc3489
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<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<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.
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
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
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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