pub enum ProcessedToDeviceEvent {
Decrypted {
raw: Raw<AnyToDeviceEvent>,
encryption_info: EncryptionInfo,
},
UnableToDecrypt {
encrypted_event: Raw<AnyToDeviceEvent>,
utd_info: ToDeviceUnableToDecryptInfo,
},
PlainText(Raw<AnyToDeviceEvent>),
Invalid(Raw<AnyToDeviceEvent>),
}Expand description
Represents a to-device event after it has been processed by the Olm machine.
Variants§
Decrypted
A successfully-decrypted encrypted event. Contains the raw decrypted event and encryption info
Fields
§
raw: Raw<AnyToDeviceEvent>The raw decrypted event
§
encryption_info: EncryptionInfoThe Olm encryption info
UnableToDecrypt
An encrypted event which could not be decrypted.
PlainText(Raw<AnyToDeviceEvent>)
An unencrypted event.
Invalid(Raw<AnyToDeviceEvent>)
An invalid to device event that was ignored because it is missing some
required information to be processed (like no event type for example)
Implementations§
Source§impl ProcessedToDeviceEvent
impl ProcessedToDeviceEvent
Sourcepub fn to_raw(&self) -> Raw<AnyToDeviceEvent>
pub fn to_raw(&self) -> Raw<AnyToDeviceEvent>
Converts a ProcessedToDeviceEvent to the Raw<AnyToDeviceEvent> it
encapsulates
Sourcepub fn as_raw(&self) -> &Raw<AnyToDeviceEvent>
pub fn as_raw(&self) -> &Raw<AnyToDeviceEvent>
Gets the raw to-device event.
Trait Implementations§
Source§impl Clone for ProcessedToDeviceEvent
impl Clone for ProcessedToDeviceEvent
Auto Trait Implementations§
impl Freeze for ProcessedToDeviceEvent
impl RefUnwindSafe for ProcessedToDeviceEvent
impl Send for ProcessedToDeviceEvent
impl Sync for ProcessedToDeviceEvent
impl Unpin for ProcessedToDeviceEvent
impl UnsafeUnpin for ProcessedToDeviceEvent
impl UnwindSafe for ProcessedToDeviceEvent
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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