#[non_exhaustive]pub enum AnyToDeviceEvent {
Show 15 variants
Dummy(ToDeviceEvent<ToDeviceDummyEventContent>),
RoomKey(ToDeviceEvent<ToDeviceRoomKeyEventContent>),
RoomKeyRequest(ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>),
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>),
}
Available on crate feature
events
only.Expand description
Any to-device event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Dummy(ToDeviceEvent<ToDeviceDummyEventContent>)
m.dummy
RoomKey(ToDeviceEvent<ToDeviceRoomKeyEventContent>)
m.room_key
RoomKeyRequest(ToDeviceEvent<ToDeviceRoomKeyRequestEventContent>)
m.room_key_request
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
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
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
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
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnyToDeviceEvent
impl RefUnwindSafe for AnyToDeviceEvent
impl Send for AnyToDeviceEvent
impl Sync for AnyToDeviceEvent
impl Unpin for AnyToDeviceEvent
impl UnwindSafe for AnyToDeviceEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more