pub struct DecryptedOlmV1Event<C>{
pub sender: OwnedUserId,
pub recipient: OwnedUserId,
pub keys: OlmV1Keys,
pub recipient_keys: OlmV1Keys,
pub sender_device_keys: Option<DeviceKeys>,
pub content: C,
}
Expand description
An m.olm.v1.curve25519-aes-sha2
decrypted to-device event.
Note: This event will reserialize events lossily; unknown fields will be lost during deserialization.
Fields§
§sender: OwnedUserId
The sender of the event, as set by the sender of the event.
recipient: OwnedUserId
The intended recipient of the event, as set by the sender of the event.
keys: OlmV1Keys
The sender’s signing keys of the encrypted event.
recipient_keys: OlmV1Keys
The recipient’s signing keys of the encrypted event.
sender_device_keys: Option<DeviceKeys>
The device keys if supplied as per MSC4147
content: C
The type of the event.
Implementations§
Source§impl DecryptedOlmV1Event<ForwardedRoomKeyContent>
impl DecryptedOlmV1Event<ForwardedRoomKeyContent>
Sourcepub fn room_key_info(&self) -> Option<SupportedKeyInfo>
pub fn room_key_info(&self) -> Option<SupportedKeyInfo>
Get the unique info about the room key that is contained in this forwarded room key event.
Returns None
if we do not understand the algorithm that was used to
encrypt the event.
Trait Implementations§
Source§impl<C> Clone for DecryptedOlmV1Event<C>
impl<C> Clone for DecryptedOlmV1Event<C>
Source§fn clone(&self) -> DecryptedOlmV1Event<C>
fn clone(&self) -> DecryptedOlmV1Event<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<C> Debug for DecryptedOlmV1Event<C>
impl<C> Debug for DecryptedOlmV1Event<C>
Source§impl<'de, C> Deserialize<'de> for DecryptedOlmV1Event<C>
impl<'de, C> Deserialize<'de> for DecryptedOlmV1Event<C>
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<C: EventType + Debug + Sized + Serialize> Serialize for DecryptedOlmV1Event<C>
impl<C: EventType + Debug + Sized + Serialize> Serialize for DecryptedOlmV1Event<C>
Source§fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
A customized Serialize
implementation that ensures that the
event_type
field is present in the serialized JSON.
The event_type
in the DecryptedOlmV1Event
is omitted because the
event type is expressed in the generic type C
. To properly serialize
the DecryptedOlmV1Event
we’ll must extract the event type from C
and reintroduce it into the JSON field.
Source§impl TryFrom<&DecryptedOlmV1Event<ForwardedRoomKeyContent>> for InboundGroupSession
impl TryFrom<&DecryptedOlmV1Event<ForwardedRoomKeyContent>> for InboundGroupSession
Source§type Error = SessionCreationError
type Error = SessionCreationError
Auto Trait Implementations§
impl<C> Freeze for DecryptedOlmV1Event<C>where
C: Freeze,
impl<C> RefUnwindSafe for DecryptedOlmV1Event<C>where
C: RefUnwindSafe,
impl<C> Send for DecryptedOlmV1Event<C>where
C: Send,
impl<C> Sync for DecryptedOlmV1Event<C>where
C: Sync,
impl<C> Unpin for DecryptedOlmV1Event<C>where
C: Unpin,
impl<C> UnwindSafe for DecryptedOlmV1Event<C>where
C: UnwindSafe,
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<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>
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>
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