pub enum AnyDecryptedOlmEvent {
RoomKey(DecryptedRoomKeyEvent),
ForwardedRoomKey(DecryptedForwardedRoomKeyEvent),
SecretSend(DecryptedSecretSendEvent),
Dummy(DecryptedDummyEvent),
Custom(Box<ToDeviceCustomEvent>),
}
Expand description
An enum over the various events that were decrypted using the
m.olm.v1.curve25519-aes-sha2
algorithm.
Variants§
RoomKey(DecryptedRoomKeyEvent)
The m.room_key
decrypted to-device event.
ForwardedRoomKey(DecryptedForwardedRoomKeyEvent)
The m.forwarded_room_key
decrypted to-device event.
SecretSend(DecryptedSecretSendEvent)
The m.secret.send
decrypted to-device event.
Dummy(DecryptedDummyEvent)
The m.dummy
decrypted to-device event.
Custom(Box<ToDeviceCustomEvent>)
A decrypted to-device event of an unknown or custom type.
Implementations§
Source§impl AnyDecryptedOlmEvent
impl AnyDecryptedOlmEvent
Sourcepub fn recipient(&self) -> &UserId
pub fn recipient(&self) -> &UserId
The intended recipient of the event, as set by the sender of the event.
Sourcepub fn recipient_keys(&self) -> &OlmV1Keys
pub fn recipient_keys(&self) -> &OlmV1Keys
The recipient’s signing keys of the encrypted event.
Sourcepub fn event_type(&self) -> &str
pub fn event_type(&self) -> &str
The event type of the encrypted event.
Sourcepub fn sender_device_keys(&self) -> Option<&DeviceKeys>
pub fn sender_device_keys(&self) -> Option<&DeviceKeys>
The sender’s device keys, if supplied in the message as per MSC4147
Trait Implementations§
Source§impl Debug for AnyDecryptedOlmEvent
impl Debug for AnyDecryptedOlmEvent
Source§impl<'de> Deserialize<'de> for AnyDecryptedOlmEvent
impl<'de> Deserialize<'de> for AnyDecryptedOlmEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnyDecryptedOlmEvent
impl RefUnwindSafe for AnyDecryptedOlmEvent
impl Send for AnyDecryptedOlmEvent
impl Sync for AnyDecryptedOlmEvent
impl Unpin for AnyDecryptedOlmEvent
impl UnwindSafe for AnyDecryptedOlmEvent
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, 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