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,
§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