Enum matrix_sdk_base::ruma::events::AnyToDeviceEvent
source · #[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>),
}
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more