#[non_exhaustive]pub enum AnySyncMessageLikeEvent {
Show 30 variants
CallAnswer(SyncMessageLikeEvent<CallAnswerEventContent>),
CallInvite(SyncMessageLikeEvent<CallInviteEventContent>),
CallHangup(SyncMessageLikeEvent<CallHangupEventContent>),
CallCandidates(SyncMessageLikeEvent<CallCandidatesEventContent>),
CallNegotiate(SyncMessageLikeEvent<CallNegotiateEventContent>),
CallReject(SyncMessageLikeEvent<CallRejectEventContent>),
CallSdpStreamMetadataChanged(SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>),
CallSelectAnswer(SyncMessageLikeEvent<CallSelectAnswerEventContent>),
KeyVerificationReady(SyncMessageLikeEvent<KeyVerificationReadyEventContent>),
KeyVerificationStart(SyncMessageLikeEvent<KeyVerificationStartEventContent>),
KeyVerificationCancel(SyncMessageLikeEvent<KeyVerificationCancelEventContent>),
KeyVerificationAccept(SyncMessageLikeEvent<KeyVerificationAcceptEventContent>),
KeyVerificationKey(SyncMessageLikeEvent<KeyVerificationKeyEventContent>),
KeyVerificationMac(SyncMessageLikeEvent<KeyVerificationMacEventContent>),
KeyVerificationDone(SyncMessageLikeEvent<KeyVerificationDoneEventContent>),
Location(SyncMessageLikeEvent<LocationEventContent>),
Message(SyncMessageLikeEvent<MessageEventContent>),
PollStart(SyncMessageLikeEvent<PollStartEventContent>),
UnstablePollStart(SyncMessageLikeEvent<UnstablePollStartEventContent>),
PollResponse(SyncMessageLikeEvent<PollResponseEventContent>),
UnstablePollResponse(SyncMessageLikeEvent<UnstablePollResponseEventContent>),
PollEnd(SyncMessageLikeEvent<PollEndEventContent>),
UnstablePollEnd(SyncMessageLikeEvent<UnstablePollEndEventContent>),
Beacon(SyncMessageLikeEvent<BeaconEventContent>),
Reaction(SyncMessageLikeEvent<ReactionEventContent>),
RoomEncrypted(SyncMessageLikeEvent<RoomEncryptedEventContent>),
RoomMessage(SyncMessageLikeEvent<RoomMessageEventContent>),
RoomRedaction(SyncRoomRedactionEvent),
Sticker(SyncMessageLikeEvent<StickerEventContent>),
CallNotify(SyncMessageLikeEvent<CallNotifyEventContent>),
}
Expand description
Any message-like event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CallAnswer(SyncMessageLikeEvent<CallAnswerEventContent>)
m.call.answer
CallInvite(SyncMessageLikeEvent<CallInviteEventContent>)
m.call.invite
CallHangup(SyncMessageLikeEvent<CallHangupEventContent>)
m.call.hangup
CallCandidates(SyncMessageLikeEvent<CallCandidatesEventContent>)
m.call.candidates
CallNegotiate(SyncMessageLikeEvent<CallNegotiateEventContent>)
m.call.negotiate
CallReject(SyncMessageLikeEvent<CallRejectEventContent>)
m.call.reject
CallSdpStreamMetadataChanged(SyncMessageLikeEvent<CallSdpStreamMetadataChangedEventContent>)
m.call.sdp_stream_metadata_changed
This variant can also be deserialized from the org.matrix.call.sdp_stream_metadata_changed
type.
CallSelectAnswer(SyncMessageLikeEvent<CallSelectAnswerEventContent>)
m.call.select_answer
KeyVerificationReady(SyncMessageLikeEvent<KeyVerificationReadyEventContent>)
m.key.verification.ready
KeyVerificationStart(SyncMessageLikeEvent<KeyVerificationStartEventContent>)
m.key.verification.start
KeyVerificationCancel(SyncMessageLikeEvent<KeyVerificationCancelEventContent>)
m.key.verification.cancel
KeyVerificationAccept(SyncMessageLikeEvent<KeyVerificationAcceptEventContent>)
m.key.verification.accept
KeyVerificationKey(SyncMessageLikeEvent<KeyVerificationKeyEventContent>)
m.key.verification.key
KeyVerificationMac(SyncMessageLikeEvent<KeyVerificationMacEventContent>)
m.key.verification.mac
KeyVerificationDone(SyncMessageLikeEvent<KeyVerificationDoneEventContent>)
m.key.verification.done
Location(SyncMessageLikeEvent<LocationEventContent>)
m.location
Message(SyncMessageLikeEvent<MessageEventContent>)
m.message
This variant uses the unstable type org.matrix.msc1767.message
.
This variant can also be deserialized from the m.message
type.
PollStart(SyncMessageLikeEvent<PollStartEventContent>)
m.poll.start
UnstablePollStart(SyncMessageLikeEvent<UnstablePollStartEventContent>)
org.matrix.msc3381.poll.start
PollResponse(SyncMessageLikeEvent<PollResponseEventContent>)
m.poll.response
UnstablePollResponse(SyncMessageLikeEvent<UnstablePollResponseEventContent>)
org.matrix.msc3381.poll.response
PollEnd(SyncMessageLikeEvent<PollEndEventContent>)
m.poll.end
UnstablePollEnd(SyncMessageLikeEvent<UnstablePollEndEventContent>)
org.matrix.msc3381.poll.end
Beacon(SyncMessageLikeEvent<BeaconEventContent>)
m.beacon
This variant uses the unstable type org.matrix.msc3672.beacon
.
This variant can also be deserialized from the m.beacon
type.
Reaction(SyncMessageLikeEvent<ReactionEventContent>)
m.reaction
RoomEncrypted(SyncMessageLikeEvent<RoomEncryptedEventContent>)
m.room.encrypted
RoomMessage(SyncMessageLikeEvent<RoomMessageEventContent>)
m.room.message
RoomRedaction(SyncRoomRedactionEvent)
m.room.redaction
Sticker(SyncMessageLikeEvent<StickerEventContent>)
m.sticker
CallNotify(SyncMessageLikeEvent<CallNotifyEventContent>)
m.call.notify
This variant uses the unstable type org.matrix.msc4075.call.notify
.
This variant can also be deserialized from the m.call.notify
type.
Implementations§
Source§impl 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 relations(&self) -> BundledMessageLikeRelations<AnySyncMessageLikeEvent>
pub fn relations(&self) -> BundledMessageLikeRelations<AnySyncMessageLikeEvent>
Returns this event’s relations
from inside unsigned
.
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.
Source§impl 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§
Source§impl Clone for AnySyncMessageLikeEvent
impl Clone for AnySyncMessageLikeEvent
Source§fn clone(&self) -> AnySyncMessageLikeEvent
fn clone(&self) -> AnySyncMessageLikeEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more