Enum ruma::events::SyncMessageLikeEvent
source · [−]pub enum SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent, {
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
sourceimpl<C> SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
impl<C> SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
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
sourceimpl<C> Clone for SyncMessageLikeEvent<C> where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
<C as RedactContent>::Redacted: Clone,
impl<C> Clone for SyncMessageLikeEvent<C> where
C: Clone + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
<C as RedactContent>::Redacted: Clone,
sourcefn clone(&self) -> SyncMessageLikeEvent<C>
fn clone(&self) -> SyncMessageLikeEvent<C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<C> Debug for SyncMessageLikeEvent<C> where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
<C as RedactContent>::Redacted: Debug,
impl<C> Debug for SyncMessageLikeEvent<C> where
C: Debug + MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
<C as RedactContent>::Redacted: Debug,
sourceimpl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
sourcefn 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
sourceimpl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
sourcefn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<CallAnswerEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<CallAnswerEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<CallCandidatesEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<CallCandidatesEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<CallHangupEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<CallHangupEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<CallInviteEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<CallInviteEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationAcceptEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationAcceptEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationCancelEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationCancelEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationDoneEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationDoneEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationKeyEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationKeyEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationMacEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationMacEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationReadyEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationReadyEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<KeyVerificationStartEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<KeyVerificationStartEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<ReactionEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<ReactionEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<RoomEncryptedEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<RoomEncryptedEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<RoomMessageEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<RoomMessageEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomMessageFeedbackEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageFeedbackEventContent>> for AnySyncMessageLikeEvent
sourcefn from(
c: SyncMessageLikeEvent<RoomMessageFeedbackEventContent>
) -> AnySyncMessageLikeEvent
fn from(
c: SyncMessageLikeEvent<RoomMessageFeedbackEventContent>
) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
fn from(c: SyncMessageLikeEvent<StickerEventContent>) -> AnySyncMessageLikeEvent
Converts to this type from the input type.
sourceimpl<C> Redact for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
impl<C> Redact for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
type Redacted = SyncMessageLikeEvent<C>
type Redacted = SyncMessageLikeEvent<C>
The redacted form of the event.
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> SyncMessageLikeEvent<C>
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> SyncMessageLikeEvent<C>
Transforms self
into a redacted form (removing most fields) according to the spec. Read more
sourceimpl<C> Serialize for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent + Serialize,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
impl<C> Serialize for SyncMessageLikeEvent<C> where
C: MessageLikeEventContent + RedactContent + Serialize,
<C as RedactContent>::Redacted: MessageLikeEventContent,
<C as RedactContent>::Redacted: RedactedEventContent,
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl<C> RefUnwindSafe for SyncMessageLikeEvent<C> where
C: RefUnwindSafe,
<C as RedactContent>::Redacted: RefUnwindSafe,
impl<C> Send for SyncMessageLikeEvent<C> where
C: Send,
<C as RedactContent>::Redacted: Send,
impl<C> Sync for SyncMessageLikeEvent<C> where
C: Sync,
<C as RedactContent>::Redacted: Sync,
impl<C> Unpin for SyncMessageLikeEvent<C> where
C: Unpin,
<C as RedactContent>::Redacted: Unpin,
impl<C> UnwindSafe for SyncMessageLikeEvent<C> where
C: UnwindSafe,
<C as RedactContent>::Redacted: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more