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§
§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,
pub fn event_type(&self) -> MessageLikeEventType
pub fn event_type(&self) -> MessageLikeEventType
Returns the type
of this event.
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts
field.
pub 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.
pub 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§
§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,
§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 more§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,
§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,
§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
§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,
§fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallAnswerEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallAnswerEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallCandidatesEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallCandidatesEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallHangupEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallHangupEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallInviteEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallInviteEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallNegotiateEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallNegotiateEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallNegotiateEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallNegotiateEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallRejectEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallRejectEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallRejectEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallRejectEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<CallSelectAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallSelectAnswerEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<CallSelectAnswerEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<CallSelectAnswerEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationAcceptEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationAcceptEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationCancelEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationCancelEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationDoneEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationDoneEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationKeyEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationKeyEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationMacEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationMacEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationReadyEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationReadyEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<KeyVerificationStartEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<KeyVerificationStartEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<MessageEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc1767
only.
impl From<SyncMessageLikeEvent<MessageEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc1767
only.§fn from(c: SyncMessageLikeEvent<MessageEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<MessageEventContent>) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<PollEndEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<PollEndEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(c: SyncMessageLikeEvent<PollEndEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<PollEndEventContent>) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<PollResponseEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<PollResponseEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(
c: SyncMessageLikeEvent<PollResponseEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<PollResponseEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<PollStartEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<PollStartEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(
c: SyncMessageLikeEvent<PollStartEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<PollStartEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<ReactionEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<ReactionEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<RoomEncryptedEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<RoomEncryptedEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
§fn from(
c: SyncMessageLikeEvent<RoomMessageEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<RoomMessageEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
§fn from(c: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<UnstablePollEndEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<UnstablePollEndEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(
c: SyncMessageLikeEvent<UnstablePollEndEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollEndEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<UnstablePollResponseEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<UnstablePollResponseEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(
c: SyncMessageLikeEvent<UnstablePollResponseEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollResponseEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
§impl From<SyncMessageLikeEvent<UnstablePollStartEventContent>> for AnySyncMessageLikeEvent
Available on crate feature unstable-msc3381
only.
impl From<SyncMessageLikeEvent<UnstablePollStartEventContent>> for AnySyncMessageLikeEvent
Available on crate feature
unstable-msc3381
only.§fn from(
c: SyncMessageLikeEvent<UnstablePollStartEventContent>
) -> AnySyncMessageLikeEvent
fn from( c: SyncMessageLikeEvent<UnstablePollStartEventContent> ) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
Auto Trait Implementations§
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