Enum ruma::events::AnyToDeviceEventContent
source · #[non_exhaustive]pub enum AnyToDeviceEventContent {
Show 15 variants
Dummy(ToDeviceDummyEventContent),
RoomKey(ToDeviceRoomKeyEventContent),
RoomKeyRequest(ToDeviceRoomKeyRequestEventContent),
ForwardedRoomKey(ToDeviceForwardedRoomKeyEventContent),
KeyVerificationRequest(ToDeviceKeyVerificationRequestEventContent),
KeyVerificationReady(ToDeviceKeyVerificationReadyEventContent),
KeyVerificationStart(ToDeviceKeyVerificationStartEventContent),
KeyVerificationCancel(ToDeviceKeyVerificationCancelEventContent),
KeyVerificationAccept(ToDeviceKeyVerificationAcceptEventContent),
KeyVerificationKey(ToDeviceKeyVerificationKeyEventContent),
KeyVerificationMac(ToDeviceKeyVerificationMacEventContent),
KeyVerificationDone(ToDeviceKeyVerificationDoneEventContent),
RoomEncrypted(ToDeviceRoomEncryptedEventContent),
SecretRequest(ToDeviceSecretRequestEventContent),
SecretSend(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(ToDeviceDummyEventContent)
m.dummy
RoomKey(ToDeviceRoomKeyEventContent)
m.room_key
RoomKeyRequest(ToDeviceRoomKeyRequestEventContent)
m.room_key_request
ForwardedRoomKey(ToDeviceForwardedRoomKeyEventContent)
m.forwarded_room_key
KeyVerificationRequest(ToDeviceKeyVerificationRequestEventContent)
m.key.verification.request
KeyVerificationReady(ToDeviceKeyVerificationReadyEventContent)
m.key.verification.ready
KeyVerificationStart(ToDeviceKeyVerificationStartEventContent)
m.key.verification.start
KeyVerificationCancel(ToDeviceKeyVerificationCancelEventContent)
m.key.verification.cancel
KeyVerificationAccept(ToDeviceKeyVerificationAcceptEventContent)
m.key.verification.accept
KeyVerificationKey(ToDeviceKeyVerificationKeyEventContent)
m.key.verification.key
KeyVerificationMac(ToDeviceKeyVerificationMacEventContent)
m.key.verification.mac
KeyVerificationDone(ToDeviceKeyVerificationDoneEventContent)
m.key.verification.done
RoomEncrypted(ToDeviceRoomEncryptedEventContent)
m.room.encrypted
SecretRequest(ToDeviceSecretRequestEventContent)
m.secret.request
SecretSend(ToDeviceSecretSendEventContent)
m.secret.send
Trait Implementations§
source§impl Clone for AnyToDeviceEventContent
impl Clone for AnyToDeviceEventContent
source§fn clone(&self) -> AnyToDeviceEventContent
fn clone(&self) -> AnyToDeviceEventContent
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 AnyToDeviceEventContent
impl Debug for AnyToDeviceEventContent
source§impl EventContent for AnyToDeviceEventContent
impl EventContent for AnyToDeviceEventContent
§type EventType = ToDeviceEventType
type EventType = ToDeviceEventType
The Rust enum for the event kind’s known types.
source§fn event_type(&self) -> <AnyToDeviceEventContent as EventContent>::EventType
fn event_type(&self) -> <AnyToDeviceEventContent as EventContent>::EventType
Get the event’s type, like
m.room.message
.source§impl EventContentFromType for AnyToDeviceEventContent
impl EventContentFromType for AnyToDeviceEventContent
source§fn from_parts(
event_type: &str,
json: &RawValue,
) -> Result<AnyToDeviceEventContent, Error>
fn from_parts( event_type: &str, json: &RawValue, ) -> Result<AnyToDeviceEventContent, Error>
Constructs this event content from the given event type and JSON.
source§impl From<ToDeviceDummyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceDummyEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceDummyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceDummyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceForwardedRoomKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceForwardedRoomKeyEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceForwardedRoomKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceForwardedRoomKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationAcceptEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationAcceptEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationAcceptEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationAcceptEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationCancelEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationCancelEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationCancelEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationCancelEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationDoneEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationDoneEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationDoneEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationDoneEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationKeyEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationReadyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationReadyEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationReadyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationReadyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationRequestEventContent> for AnyToDeviceEventContent
source§fn from(
c: ToDeviceKeyVerificationRequestEventContent,
) -> AnyToDeviceEventContent
fn from( c: ToDeviceKeyVerificationRequestEventContent, ) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceKeyVerificationStartEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationStartEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceKeyVerificationStartEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationStartEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceRoomEncryptedEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomEncryptedEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceRoomEncryptedEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomEncryptedEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceRoomKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceRoomKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceRoomKeyRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyRequestEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceRoomKeyRequestEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomKeyRequestEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceSecretRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceSecretRequestEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceSecretRequestEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceSecretRequestEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl From<ToDeviceSecretSendEventContent> for AnyToDeviceEventContent
impl From<ToDeviceSecretSendEventContent> for AnyToDeviceEventContent
source§fn from(c: ToDeviceSecretSendEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceSecretSendEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
source§impl Serialize for AnyToDeviceEventContent
impl Serialize for AnyToDeviceEventContent
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl ToDeviceEventContent for AnyToDeviceEventContent
Auto Trait Implementations§
impl Freeze for AnyToDeviceEventContent
impl RefUnwindSafe for AnyToDeviceEventContent
impl Send for AnyToDeviceEventContent
impl Sync for AnyToDeviceEventContent
impl Unpin for AnyToDeviceEventContent
impl UnwindSafe for AnyToDeviceEventContent
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
)