#[non_exhaustive]pub enum ToDeviceEventType {
Show 18 variants
Dummy,
RoomKey,
RoomKeyBundle,
RoomKeyRequest,
RoomKeyWithheld,
ForwardedRoomKey,
KeyVerificationRequest,
KeyVerificationReady,
KeyVerificationStart,
KeyVerificationCancel,
KeyVerificationAccept,
KeyVerificationKey,
KeyVerificationMac,
KeyVerificationDone,
RoomEncrypted,
SecretRequest,
SecretSend,
SecretPush,
}Expand description
The type of ToDeviceEvent this is.
This type can hold an arbitrary string. To build events with a custom type, convert it
from a string with ::from() / .into(). To check for events that are not available as a
documented variant here, use its string representation, obtained through .to_string().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dummy
m.dummy
RoomKey
m.room_key
RoomKeyBundle
m.room_key_bundle
This variant uses the unstable type io.element.msc4268.room_key_bundle.
This variant can also be deserialized from the m.room_key_bundle type.
RoomKeyRequest
m.room_key_request
RoomKeyWithheld
m.room_key.withheld
ForwardedRoomKey
m.forwarded_room_key
KeyVerificationRequest
m.key.verification.request
KeyVerificationReady
m.key.verification.ready
KeyVerificationStart
m.key.verification.start
KeyVerificationCancel
m.key.verification.cancel
KeyVerificationAccept
m.key.verification.accept
KeyVerificationKey
m.key.verification.key
KeyVerificationMac
m.key.verification.mac
KeyVerificationDone
m.key.verification.done
RoomEncrypted
m.room.encrypted
SecretRequest
m.secret.request
SecretSend
m.secret.send
SecretPush
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.
Implementations§
Source§impl ToDeviceEventType
impl ToDeviceEventType
Sourcepub fn from_string(s: String) -> Self
pub fn from_string(s: String) -> Self
Construct a variant of the enum from a string.
Trait Implementations§
Source§impl Clone for ToDeviceEventType
impl Clone for ToDeviceEventType
Source§fn clone(&self) -> ToDeviceEventType
fn clone(&self) -> ToDeviceEventType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for ToDeviceEventType
impl<UT> ConvertError<UT> for ToDeviceEventType
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for ToDeviceEventType
impl Debug for ToDeviceEventType
Source§impl<'de> Deserialize<'de> for ToDeviceEventType
impl<'de> Deserialize<'de> for ToDeviceEventType
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Display for ToDeviceEventType
impl Display for ToDeviceEventType
Source§impl<UT> FfiConverter<UT> for ToDeviceEventType
impl<UT> FfiConverter<UT> for ToDeviceEventType
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<&str> for ToDeviceEventType
impl From<&str> for ToDeviceEventType
Source§impl From<String> for ToDeviceEventType
impl From<String> for ToDeviceEventType
Source§impl Hash for ToDeviceEventType
impl Hash for ToDeviceEventType
Source§impl<UT> Lift<UT> for ToDeviceEventType
impl<UT> Lift<UT> for ToDeviceEventType
Source§impl<UT> LiftRef<UT> for ToDeviceEventType
impl<UT> LiftRef<UT> for ToDeviceEventType
type LiftType = ToDeviceEventType
Source§impl<UT> LiftReturn<UT> for ToDeviceEventType
impl<UT> LiftReturn<UT> for ToDeviceEventType
Source§type ReturnType = <ToDeviceEventType as Lift<UT>>::FfiType
type ReturnType = <ToDeviceEventType as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for ToDeviceEventType
impl<UT> Lower<UT> for ToDeviceEventType
Source§impl<UT> LowerError<UT> for ToDeviceEventType
impl<UT> LowerError<UT> for ToDeviceEventType
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for ToDeviceEventType
impl<UT> LowerReturn<UT> for ToDeviceEventType
Source§type ReturnType = <ToDeviceEventType as Lower<UT>>::FfiType
type ReturnType = <ToDeviceEventType as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl Ord for ToDeviceEventType
impl Ord for ToDeviceEventType
Source§impl PartialEq for ToDeviceEventType
impl PartialEq for ToDeviceEventType
Source§impl PartialOrd for ToDeviceEventType
impl PartialOrd for ToDeviceEventType
Source§impl Serialize for ToDeviceEventType
impl Serialize for ToDeviceEventType
Source§impl<UT> TypeId<UT> for ToDeviceEventType
impl<UT> TypeId<UT> for ToDeviceEventType
const TYPE_ID_META: MetadataBuffer
impl Eq for ToDeviceEventType
impl StructuralPartialEq for ToDeviceEventType
Auto Trait Implementations§
impl Freeze for ToDeviceEventType
impl RefUnwindSafe for ToDeviceEventType
impl Send for ToDeviceEventType
impl Sync for ToDeviceEventType
impl Unpin for ToDeviceEventType
impl UnwindSafe for ToDeviceEventType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more