Enum ruma_common::events::AnyMessageLikeEvent
source · [−]#[non_exhaustive]
pub enum AnyMessageLikeEvent {
Show 17 variants
CallAnswer(CallAnswerEvent),
CallInvite(CallInviteEvent),
CallHangup(CallHangupEvent),
CallCandidates(CallCandidatesEvent),
KeyVerificationReady(KeyVerificationReadyEvent),
KeyVerificationStart(KeyVerificationStartEvent),
KeyVerificationCancel(KeyVerificationCancelEvent),
KeyVerificationAccept(KeyVerificationAcceptEvent),
KeyVerificationKey(KeyVerificationKeyEvent),
KeyVerificationMac(KeyVerificationMacEvent),
KeyVerificationDone(KeyVerificationDoneEvent),
Reaction(ReactionEvent),
RoomEncrypted(RoomEncryptedEvent),
RoomMessage(RoomMessageEvent),
RoomMessageFeedback(RoomMessageFeedbackEvent),
RoomRedaction(RoomRedactionEvent),
Sticker(StickerEvent),
// some variants omitted
}
Expand description
Any message-like event.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
CallAnswer(CallAnswerEvent)
m.call.answer
CallInvite(CallInviteEvent)
m.call.invite
CallHangup(CallHangupEvent)
m.call.hangup
CallCandidates(CallCandidatesEvent)
m.call.candidates
KeyVerificationReady(KeyVerificationReadyEvent)
m.key.verification.ready
KeyVerificationStart(KeyVerificationStartEvent)
m.key.verification.start
KeyVerificationCancel(KeyVerificationCancelEvent)
m.key.verification.cancel
KeyVerificationAccept(KeyVerificationAcceptEvent)
m.key.verification.accept
KeyVerificationKey(KeyVerificationKeyEvent)
m.key.verification.key
KeyVerificationMac(KeyVerificationMacEvent)
m.key.verification.mac
KeyVerificationDone(KeyVerificationDoneEvent)
m.key.verification.done
Reaction(ReactionEvent)
m.reaction
RoomEncrypted(RoomEncryptedEvent)
m.room.encrypted
RoomMessage(RoomMessageEvent)
m.room.message
RoomMessageFeedback(RoomMessageFeedbackEvent)
m.room.message.feedback
RoomRedaction(RoomRedactionEvent)
m.room.redaction
Sticker(StickerEvent)
m.sticker
Implementations
sourceimpl AnyMessageLikeEvent
impl AnyMessageLikeEvent
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.
Trait Implementations
sourceimpl Clone for AnyMessageLikeEvent
impl Clone for AnyMessageLikeEvent
sourcefn clone(&self) -> AnyMessageLikeEvent
fn clone(&self) -> AnyMessageLikeEvent
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 AnyMessageLikeEvent
impl Debug for AnyMessageLikeEvent
sourceimpl<'de> Deserialize<'de> for AnyMessageLikeEvent
impl<'de> Deserialize<'de> for AnyMessageLikeEvent
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<AnyMessageLikeEvent> for AnyRoomEvent
impl From<AnyMessageLikeEvent> for AnyRoomEvent
sourcefn from(c: AnyMessageLikeEvent) -> Self
fn from(c: AnyMessageLikeEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<CallAnswerEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallAnswerEventContent>> for AnyMessageLikeEvent
sourcefn from(c: CallAnswerEvent) -> Self
fn from(c: CallAnswerEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<CallCandidatesEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallCandidatesEventContent>> for AnyMessageLikeEvent
sourcefn from(c: CallCandidatesEvent) -> Self
fn from(c: CallCandidatesEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<CallHangupEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallHangupEventContent>> for AnyMessageLikeEvent
sourcefn from(c: CallHangupEvent) -> Self
fn from(c: CallHangupEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<CallInviteEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<CallInviteEventContent>> for AnyMessageLikeEvent
sourcefn from(c: CallInviteEvent) -> Self
fn from(c: CallInviteEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationAcceptEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationAcceptEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationAcceptEvent) -> Self
fn from(c: KeyVerificationAcceptEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationCancelEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationCancelEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationCancelEvent) -> Self
fn from(c: KeyVerificationCancelEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationDoneEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationDoneEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationDoneEvent) -> Self
fn from(c: KeyVerificationDoneEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationKeyEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationKeyEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationKeyEvent) -> Self
fn from(c: KeyVerificationKeyEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationMacEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationMacEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationMacEvent) -> Self
fn from(c: KeyVerificationMacEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationReadyEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationReadyEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationReadyEvent) -> Self
fn from(c: KeyVerificationReadyEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<KeyVerificationStartEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<KeyVerificationStartEventContent>> for AnyMessageLikeEvent
sourcefn from(c: KeyVerificationStartEvent) -> Self
fn from(c: KeyVerificationStartEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<ReactionEventContent>> for AnyMessageLikeEvent
sourcefn from(c: ReactionEvent) -> Self
fn from(c: ReactionEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<RoomEncryptedEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<RoomEncryptedEventContent>> for AnyMessageLikeEvent
sourcefn from(c: RoomEncryptedEvent) -> Self
fn from(c: RoomEncryptedEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<RoomMessageEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<RoomMessageEventContent>> for AnyMessageLikeEvent
sourcefn from(c: RoomMessageEvent) -> Self
fn from(c: RoomMessageEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<RoomMessageFeedbackEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<RoomMessageFeedbackEventContent>> for AnyMessageLikeEvent
sourcefn from(c: RoomMessageFeedbackEvent) -> Self
fn from(c: RoomMessageFeedbackEvent) -> Self
Converts to this type from the input type.
sourceimpl From<MessageLikeEvent<StickerEventContent>> for AnyMessageLikeEvent
impl From<MessageLikeEvent<StickerEventContent>> for AnyMessageLikeEvent
sourcefn from(c: StickerEvent) -> Self
fn from(c: StickerEvent) -> Self
Converts to this type from the input type.
sourceimpl From<RoomRedactionEvent> for AnyMessageLikeEvent
impl From<RoomRedactionEvent> for AnyMessageLikeEvent
sourcefn from(c: RoomRedactionEvent) -> Self
fn from(c: RoomRedactionEvent) -> Self
Converts to this type from the input type.
sourceimpl Redact for AnyMessageLikeEvent
impl Redact for AnyMessageLikeEvent
type Redacted = AnyMessageLikeEvent
type Redacted = AnyMessageLikeEvent
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 AnyMessageLikeEvent
impl Send for AnyMessageLikeEvent
impl Sync for AnyMessageLikeEvent
impl Unpin for AnyMessageLikeEvent
impl UnwindSafe for AnyMessageLikeEvent
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