Struct ruma_common::encryption::DeviceKeys [−][src]
pub struct DeviceKeys { pub user_id: UserId, pub device_id: DeviceIdBox, pub algorithms: Vec<EventEncryptionAlgorithm>, pub keys: BTreeMap<DeviceKeyId, String>, pub signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>, pub unsigned: UnsignedDeviceInfo, }
Expand description
Identity keys for a device.
Fields
user_id: UserId
The ID of the user the device belongs to. Must match the user ID used when logging in.
device_id: DeviceIdBox
The ID of the device these keys belong to. Must match the device ID used when logging in.
algorithms: Vec<EventEncryptionAlgorithm>
The encryption algorithms supported by this device.
keys: BTreeMap<DeviceKeyId, String>
Public identity keys.
signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>
Signatures for the device key object.
unsigned: UnsignedDeviceInfo
Additional data added to the device key information by intermediate servers, and not covered by the signatures.
Implementations
pub fn new(
user_id: UserId,
device_id: DeviceIdBox,
algorithms: Vec<EventEncryptionAlgorithm>,
keys: BTreeMap<DeviceKeyId, String>,
signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>
) -> Self
pub fn new(
user_id: UserId,
device_id: DeviceIdBox,
algorithms: Vec<EventEncryptionAlgorithm>,
keys: BTreeMap<DeviceKeyId, String>,
signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>
) -> Self
Creates a new DeviceKeys
from the given user id, device id, algorithms, keys and
signatures.
Trait Implementations
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 RefUnwindSafe for DeviceKeys
impl Send for DeviceKeys
impl Sync for DeviceKeys
impl Unpin for DeviceKeys
impl UnwindSafe for DeviceKeys
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more