Enum AnyToDeviceEventContent
#[non_exhaustive]pub enum AnyToDeviceEventContent {
Show 16 variants
Dummy(ToDeviceDummyEventContent),
RoomKey(ToDeviceRoomKeyEventContent),
RoomKeyRequest(ToDeviceRoomKeyRequestEventContent),
RoomKeyWithheld(ToDeviceRoomKeyWithheldEventContent),
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
RoomKeyWithheld(ToDeviceRoomKeyWithheldEventContent)
m.room_key.withheld
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§
§impl Clone for AnyToDeviceEventContent
impl Clone for AnyToDeviceEventContent
§fn clone(&self) -> AnyToDeviceEventContent
fn clone(&self) -> AnyToDeviceEventContent
Returns a duplicate 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 more§impl Debug for AnyToDeviceEventContent
impl Debug for AnyToDeviceEventContent
§impl EventContentFromType for AnyToDeviceEventContent
impl EventContentFromType for AnyToDeviceEventContent
§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.
§impl From<ToDeviceDummyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceDummyEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceDummyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceDummyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceForwardedRoomKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceForwardedRoomKeyEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceForwardedRoomKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceForwardedRoomKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationAcceptEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationAcceptEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationAcceptEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationAcceptEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationCancelEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationCancelEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationCancelEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationCancelEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationDoneEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationDoneEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationDoneEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationDoneEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationKeyEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationMacEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationMacEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationReadyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationReadyEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationReadyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationReadyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationRequestEventContent> for AnyToDeviceEventContent
§fn from(
c: ToDeviceKeyVerificationRequestEventContent,
) -> AnyToDeviceEventContent
fn from( c: ToDeviceKeyVerificationRequestEventContent, ) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceKeyVerificationStartEventContent> for AnyToDeviceEventContent
impl From<ToDeviceKeyVerificationStartEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceKeyVerificationStartEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceKeyVerificationStartEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceRoomEncryptedEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomEncryptedEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceRoomEncryptedEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomEncryptedEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceRoomKeyEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceRoomKeyEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomKeyEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceRoomKeyRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyRequestEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceRoomKeyRequestEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomKeyRequestEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceRoomKeyWithheldEventContent> for AnyToDeviceEventContent
impl From<ToDeviceRoomKeyWithheldEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceRoomKeyWithheldEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceRoomKeyWithheldEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceSecretRequestEventContent> for AnyToDeviceEventContent
impl From<ToDeviceSecretRequestEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceSecretRequestEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceSecretRequestEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl From<ToDeviceSecretSendEventContent> for AnyToDeviceEventContent
impl From<ToDeviceSecretSendEventContent> for AnyToDeviceEventContent
§fn from(c: ToDeviceSecretSendEventContent) -> AnyToDeviceEventContent
fn from(c: ToDeviceSecretSendEventContent) -> AnyToDeviceEventContent
Converts to this type from the input type.
§impl Serialize for AnyToDeviceEventContent
impl Serialize for AnyToDeviceEventContent
§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
impl ToDeviceEventContent for AnyToDeviceEventContent
§fn event_type(&self) -> ToDeviceEventType
fn event_type(&self) -> ToDeviceEventType
Get the event’s type, like
m.room_key
.impl JsonCastable<AnyToDeviceEventContent> for RoomKeyRequestContent
impl JsonCastable<AnyToDeviceEventContent> for RoomKeyWithheldContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceDummyEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceEncryptedEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceForwardedRoomKeyEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationAcceptEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationCancelEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationDoneEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationKeyEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationMacEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationReadyEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationRequestEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceKeyVerificationStartEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceRoomEncryptedEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceRoomKeyEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceRoomKeyRequestEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceRoomKeyWithheldEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceSecretRequestEventContent
impl JsonCastable<AnyToDeviceEventContent> for ToDeviceSecretSendEventContent
impl JsonCastable<Map<String, Value>> 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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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