Struct matrix_sdk_crypto::olm::ExportedRoomKey
source · [−]pub struct ExportedRoomKey {
pub algorithm: EventEncryptionAlgorithm,
pub room_id: OwnedRoomId,
pub sender_key: String,
pub session_id: String,
pub session_key: ExportedSessionKey,
pub sender_claimed_keys: BTreeMap<DeviceKeyAlgorithm, String>,
pub forwarding_curve25519_key_chain: Vec<String>,
}
Expand description
An exported version of an InboundGroupSession
This can be used to share the InboundGroupSession
in an exported file.
Fields
algorithm: EventEncryptionAlgorithm
The encryption algorithm that the session uses.
room_id: OwnedRoomId
The room where the session is used.
sender_key: String
The Curve25519 key of the device which initiated the session originally.
session_id: String
The ID of the session that the key is for.
session_key: ExportedSessionKey
The key for the session.
sender_claimed_keys: BTreeMap<DeviceKeyAlgorithm, String>
The Ed25519 key of the device which initiated the session originally.
forwarding_curve25519_key_chain: Vec<String>
Chain of Curve25519 keys through which this session was forwarded, via m.forwarded_room_key events.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ExportedRoomKey
impl<'de> Deserialize<'de> for ExportedRoomKey
sourcefn 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
sourceimpl From<ExportedRoomKey> for InboundGroupSession
impl From<ExportedRoomKey> for InboundGroupSession
sourcefn from(key: ExportedRoomKey) -> Self
fn from(key: ExportedRoomKey) -> Self
Converts to this type from the input type.
sourceimpl Serialize for ExportedRoomKey
impl Serialize for ExportedRoomKey
sourceimpl TryFrom<ToDeviceForwardedRoomKeyEventContent> for ExportedRoomKey
impl TryFrom<ToDeviceForwardedRoomKeyEventContent> for ExportedRoomKey
sourcefn try_from(
forwarded_key: ToDeviceForwardedRoomKeyEventContent
) -> Result<Self, Self::Error>
fn try_from(
forwarded_key: ToDeviceForwardedRoomKeyEventContent
) -> Result<Self, Self::Error>
Convert the content of a forwarded room key into a exported room key.
type Error = SessionKeyDecodeError
type Error = SessionKeyDecodeError
The type returned in the event of a conversion error.
sourceimpl TryInto<ToDeviceForwardedRoomKeyEventContent> for ExportedRoomKey
impl TryInto<ToDeviceForwardedRoomKeyEventContent> for ExportedRoomKey
sourcefn try_into(self) -> Result<ToDeviceForwardedRoomKeyEventContent, Self::Error>
fn try_into(self) -> Result<ToDeviceForwardedRoomKeyEventContent, Self::Error>
Convert an exported room key into a content for a forwarded room key event.
This will fail if the exported room key has multiple sender claimed keys
or if the algorithm of the claimed sender key isn’t
DeviceKeyAlgorithm::Ed25519
.
Auto Trait Implementations
impl RefUnwindSafe for ExportedRoomKey
impl Send for ExportedRoomKey
impl Sync for ExportedRoomKey
impl Unpin for ExportedRoomKey
impl UnwindSafe for ExportedRoomKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more