#[non_exhaustive]
pub enum AnySyncMessageLikeEvent {
Show 17 variants
CallAnswer(SyncCallAnswerEvent),
CallInvite(SyncCallInviteEvent),
CallHangup(SyncCallHangupEvent),
CallCandidates(SyncCallCandidatesEvent),
KeyVerificationReady(SyncKeyVerificationReadyEvent),
KeyVerificationStart(SyncKeyVerificationStartEvent),
KeyVerificationCancel(SyncKeyVerificationCancelEvent),
KeyVerificationAccept(SyncKeyVerificationAcceptEvent),
KeyVerificationKey(SyncKeyVerificationKeyEvent),
KeyVerificationMac(SyncKeyVerificationMacEvent),
KeyVerificationDone(SyncKeyVerificationDoneEvent),
Reaction(SyncReactionEvent),
RoomEncrypted(SyncRoomEncryptedEvent),
RoomMessage(SyncRoomMessageEvent),
RoomMessageFeedback(SyncRoomMessageFeedbackEvent),
RoomRedaction(SyncRoomRedactionEvent),
Sticker(SyncStickerEvent),
// some variants omitted
}
Expand description
Any message-like event.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
CallAnswer(SyncCallAnswerEvent)
m.call.answer
CallInvite(SyncCallInviteEvent)
m.call.invite
CallHangup(SyncCallHangupEvent)
m.call.hangup
CallCandidates(SyncCallCandidatesEvent)
m.call.candidates
KeyVerificationReady(SyncKeyVerificationReadyEvent)
m.key.verification.ready
KeyVerificationStart(SyncKeyVerificationStartEvent)
m.key.verification.start
KeyVerificationCancel(SyncKeyVerificationCancelEvent)
m.key.verification.cancel
KeyVerificationAccept(SyncKeyVerificationAcceptEvent)
m.key.verification.accept
KeyVerificationKey(SyncKeyVerificationKeyEvent)
m.key.verification.key
KeyVerificationMac(SyncKeyVerificationMacEvent)
m.key.verification.mac
KeyVerificationDone(SyncKeyVerificationDoneEvent)
m.key.verification.done
Reaction(SyncReactionEvent)
m.reaction
RoomEncrypted(SyncRoomEncryptedEvent)
m.room.encrypted
RoomMessage(SyncRoomMessageEvent)
m.room.message
RoomMessageFeedback(SyncRoomMessageFeedbackEvent)
m.room.message.feedback
RoomRedaction(SyncRoomRedactionEvent)
m.room.redaction
Sticker(SyncStickerEvent)
m.sticker
Implementations
sourceimpl AnySyncMessageLikeEvent
impl AnySyncMessageLikeEvent
sourcepub fn event_type(&self) -> MessageLikeEventType
pub fn event_type(&self) -> MessageLikeEventType
Returns the type
of this event.
sourcepub fn original_content(&self) -> Option<AnyMessageLikeEventContent>
pub fn original_content(&self) -> Option<AnyMessageLikeEventContent>
Returns the content for this event if it is not redacted, or None
if it is.
sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts
field.
sourcepub fn transaction_id(&self) -> Option<&TransactionId>
pub fn transaction_id(&self) -> Option<&TransactionId>
Returns this event’s transaction_id
from inside unsigned
, if there is one.
sourceimpl AnySyncMessageLikeEvent
impl AnySyncMessageLikeEvent
sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> AnyMessageLikeEvent
pub fn into_full_event(self, room_id: OwnedRoomId) -> AnyMessageLikeEvent
Convert this sync event into a full event (one with a room_id
field).
Trait Implementations
sourceimpl Clone for AnySyncMessageLikeEvent
impl Clone for AnySyncMessageLikeEvent
sourcefn clone(&self) -> AnySyncMessageLikeEvent
fn clone(&self) -> AnySyncMessageLikeEvent
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 Debug for AnySyncMessageLikeEvent
impl Debug for AnySyncMessageLikeEvent
sourceimpl<'de> Deserialize<'de> for AnySyncMessageLikeEvent
impl<'de> Deserialize<'de> for AnySyncMessageLikeEvent
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<AnyMessageLikeEvent> for AnySyncMessageLikeEvent
impl From<AnyMessageLikeEvent> for AnySyncMessageLikeEvent
sourcefn from(event: AnyMessageLikeEvent) -> Self
fn from(event: AnyMessageLikeEvent) -> Self
Converts to this type from the input type.
sourceimpl From<AnySyncMessageLikeEvent> for AnySyncRoomEvent
impl From<AnySyncMessageLikeEvent> for AnySyncRoomEvent
sourcefn from(c: AnySyncMessageLikeEvent) -> Self
fn from(c: AnySyncMessageLikeEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallAnswerEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncCallAnswerEvent) -> Self
fn from(c: SyncCallAnswerEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallCandidatesEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncCallCandidatesEvent) -> Self
fn from(c: SyncCallCandidatesEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallHangupEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncCallHangupEvent) -> Self
fn from(c: SyncCallHangupEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<CallInviteEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncCallInviteEvent) -> Self
fn from(c: SyncCallInviteEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationAcceptEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationAcceptEvent) -> Self
fn from(c: SyncKeyVerificationAcceptEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationCancelEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationCancelEvent) -> Self
fn from(c: SyncKeyVerificationCancelEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationDoneEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationDoneEvent) -> Self
fn from(c: SyncKeyVerificationDoneEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationKeyEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationKeyEvent) -> Self
fn from(c: SyncKeyVerificationKeyEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationMacEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationMacEvent) -> Self
fn from(c: SyncKeyVerificationMacEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationReadyEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationReadyEvent) -> Self
fn from(c: SyncKeyVerificationReadyEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<KeyVerificationStartEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncKeyVerificationStartEvent) -> Self
fn from(c: SyncKeyVerificationStartEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<ReactionEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncReactionEvent) -> Self
fn from(c: SyncReactionEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomEncryptedEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncRoomEncryptedEvent) -> Self
fn from(c: SyncRoomEncryptedEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncRoomMessageEvent) -> Self
fn from(c: SyncRoomMessageEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<RoomMessageFeedbackEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<RoomMessageFeedbackEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncRoomMessageFeedbackEvent) -> Self
fn from(c: SyncRoomMessageFeedbackEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
impl From<SyncMessageLikeEvent<StickerEventContent>> for AnySyncMessageLikeEvent
sourcefn from(c: SyncStickerEvent) -> Self
fn from(c: SyncStickerEvent) -> Self
Converts to this type from the input type.
sourceimpl From<SyncRoomRedactionEvent> for AnySyncMessageLikeEvent
impl From<SyncRoomRedactionEvent> for AnySyncMessageLikeEvent
sourcefn from(c: SyncRoomRedactionEvent) -> Self
fn from(c: SyncRoomRedactionEvent) -> Self
Converts to this type from the input type.
sourceimpl Redact for AnySyncMessageLikeEvent
impl Redact for AnySyncMessageLikeEvent
type Redacted = AnySyncMessageLikeEvent
type Redacted = AnySyncMessageLikeEvent
The redacted form of the event.
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self
Transforms self
into a redacted form (removing most fields) according to the spec. Read more
Auto Trait Implementations
impl RefUnwindSafe for AnySyncMessageLikeEvent
impl Send for AnySyncMessageLikeEvent
impl Sync for AnySyncMessageLikeEvent
impl Unpin for AnySyncMessageLikeEvent
impl UnwindSafe for AnySyncMessageLikeEvent
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