#[non_exhaustive]pub enum AnyToDeviceEvent {
Show 21 variants
Dummy(ToDeviceEvent<ToDeviceDummyEventContent>),
RoomKey(ToDeviceEvent<ToDeviceRoomKeyEventContent>),
RoomKeyBundle(ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>),
RoomKeyRequest(ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>),
RoomKeyWithheld(ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>),
ForwardedRoomKey(ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>),
KeyVerificationRequest(ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>),
KeyVerificationReady(ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>),
KeyVerificationStart(ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>),
KeyVerificationCancel(ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>),
KeyVerificationAccept(ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>),
KeyVerificationKey(ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>),
KeyVerificationMac(ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>),
KeyVerificationDone(ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>),
RoomEncrypted(ToDeviceEvent<ToDeviceRoomEncryptedEventContent>),
SecretRequest(ToDeviceEvent<ToDeviceSecretRequestEventContent>),
SecretSend(ToDeviceEvent<ToDeviceSecretSendEventContent>),
SecretPush(ToDeviceEvent<ToDeviceSecretPushEventContent>),
StreamSubscribe(ToDeviceEvent<ToDeviceStreamSubscribeEventContent>),
StreamCancel(ToDeviceEvent<ToDeviceStreamCancelEventContent>),
StreamUpdate(ToDeviceEvent<ToDeviceStreamUpdateEventContent>),
}events only.Expand description
Any to-device event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dummy(ToDeviceEvent<ToDeviceDummyEventContent>)
m.dummy
RoomKey(ToDeviceEvent<ToDeviceRoomKeyEventContent>)
m.room_key
RoomKeyBundle(ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>)
m.room_key_bundle
RoomKeyRequest(ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>)
m.room_key_request
RoomKeyWithheld(ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>)
m.room_key.withheld
ForwardedRoomKey(ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>)
m.forwarded_room_key
KeyVerificationRequest(ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>)
m.key.verification.request
KeyVerificationReady(ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>)
m.key.verification.ready
KeyVerificationStart(ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>)
m.key.verification.start
KeyVerificationCancel(ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>)
m.key.verification.cancel
KeyVerificationAccept(ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>)
m.key.verification.accept
KeyVerificationKey(ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>)
m.key.verification.key
KeyVerificationMac(ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>)
m.key.verification.mac
KeyVerificationDone(ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>)
m.key.verification.done
RoomEncrypted(ToDeviceEvent<ToDeviceRoomEncryptedEventContent>)
m.room.encrypted
SecretRequest(ToDeviceEvent<ToDeviceSecretRequestEventContent>)
m.secret.request
SecretSend(ToDeviceEvent<ToDeviceSecretSendEventContent>)
m.secret.send
SecretPush(ToDeviceEvent<ToDeviceSecretPushEventContent>)
unstable-msc4385 only.m.secret.push
This variant uses the unstable type io.element.msc4385.secret.push.
This variant can also be deserialized from the m.secret.push type.
StreamSubscribe(ToDeviceEvent<ToDeviceStreamSubscribeEventContent>)
unstable-msc4471 only.m.stream.subscribe
This variant uses the unstable type org.matrix.msc4471.stream.subscribe.
This variant can also be deserialized from the m.stream.subscribe type.
StreamCancel(ToDeviceEvent<ToDeviceStreamCancelEventContent>)
unstable-msc4471 only.m.stream.cancel
This variant uses the unstable type org.matrix.msc4471.stream.cancel.
This variant can also be deserialized from the m.stream.cancel type.
StreamUpdate(ToDeviceEvent<ToDeviceStreamUpdateEventContent>)
unstable-msc4471 only.m.stream.update
This variant uses the unstable type org.matrix.msc4471.stream.update.
This variant can also be deserialized from the m.stream.update type.
Implementations§
Source§impl AnyToDeviceEvent
impl AnyToDeviceEvent
Sourcepub fn event_type(&self) -> ToDeviceEventType
pub fn event_type(&self) -> ToDeviceEventType
Returns the type of this event.
Sourcepub fn content(&self) -> AnyToDeviceEventContent
pub fn content(&self) -> AnyToDeviceEventContent
Returns the content for this event.
Trait Implementations§
Source§impl Clone for AnyToDeviceEvent
impl Clone for AnyToDeviceEvent
Source§fn clone(&self) -> AnyToDeviceEvent
fn clone(&self) -> AnyToDeviceEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnyToDeviceEvent
impl Debug for AnyToDeviceEvent
Source§impl<'de> Deserialize<'de> for AnyToDeviceEvent
impl<'de> Deserialize<'de> for AnyToDeviceEvent
Source§fn deserialize<D>(
deserializer: D,
) -> Result<AnyToDeviceEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AnyToDeviceEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<ToDeviceEvent<ToDeviceDummyEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceDummyEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceDummyEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceDummyEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceForwardedRoomKeyEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationAcceptEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationCancelEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationDoneEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationKeyEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationMacEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationReadyEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationRequestEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceKeyVerificationStartEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceRoomEncryptedEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceRoomEncryptedEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceRoomEncryptedEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceRoomEncryptedEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceRoomKeyBundleEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceRoomKeyEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceRoomKeyEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceRoomKeyEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceRoomKeyEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>> for AnyToDeviceEvent
Source§fn from(
c: ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceRoomKeyWithheldEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceSecretPushEventContent>> for AnyToDeviceEvent
Available on crate feature unstable-msc4385 only.
impl From<ToDeviceEvent<ToDeviceSecretPushEventContent>> for AnyToDeviceEvent
unstable-msc4385 only.Source§fn from(c: ToDeviceEvent<ToDeviceSecretPushEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceSecretPushEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceSecretRequestEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceSecretRequestEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceSecretRequestEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceSecretRequestEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceSecretSendEventContent>> for AnyToDeviceEvent
impl From<ToDeviceEvent<ToDeviceSecretSendEventContent>> for AnyToDeviceEvent
Source§fn from(c: ToDeviceEvent<ToDeviceSecretSendEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceSecretSendEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceStreamCancelEventContent>> for AnyToDeviceEvent
Available on crate feature unstable-msc4471 only.
impl From<ToDeviceEvent<ToDeviceStreamCancelEventContent>> for AnyToDeviceEvent
unstable-msc4471 only.Source§fn from(c: ToDeviceEvent<ToDeviceStreamCancelEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceStreamCancelEventContent>) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceStreamSubscribeEventContent>> for AnyToDeviceEvent
Available on crate feature unstable-msc4471 only.
impl From<ToDeviceEvent<ToDeviceStreamSubscribeEventContent>> for AnyToDeviceEvent
unstable-msc4471 only.Source§fn from(
c: ToDeviceEvent<ToDeviceStreamSubscribeEventContent>,
) -> AnyToDeviceEvent
fn from( c: ToDeviceEvent<ToDeviceStreamSubscribeEventContent>, ) -> AnyToDeviceEvent
Source§impl From<ToDeviceEvent<ToDeviceStreamUpdateEventContent>> for AnyToDeviceEvent
Available on crate feature unstable-msc4471 only.
impl From<ToDeviceEvent<ToDeviceStreamUpdateEventContent>> for AnyToDeviceEvent
unstable-msc4471 only.Source§fn from(c: ToDeviceEvent<ToDeviceStreamUpdateEventContent>) -> AnyToDeviceEvent
fn from(c: ToDeviceEvent<ToDeviceStreamUpdateEventContent>) -> AnyToDeviceEvent
impl<C> JsonCastable<AnyToDeviceEvent> for ToDeviceEvent<C>where
C: ToDeviceEventContent,
impl JsonCastable<AnyToDeviceEvent> for AnyAppserviceToDeviceEvent
unstable-msc4203 only.