Enum 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
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<&OriginalMessageLikeEvent<C>>
pub fn as_original(&self) -> Option<&OriginalMessageLikeEvent<C>>
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
impl From<MessageLikeEvent<BeaconEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<CallNotifyEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<LocationEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<MessageEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<PollEndEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<PollResponseEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<PollStartEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<UnstablePollEndEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<UnstablePollResponseEventContent>> for AnyMessageLikeEvent
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
impl From<MessageLikeEvent<UnstablePollStartEventContent>> for AnyMessageLikeEvent
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
)