crypto: Document the rust Device struct

This commit is contained in:
Damir Jelić 2021-04-14 12:15:47 +02:00
parent aebfef8fa9
commit 5b761ef7d1
1 changed files with 10 additions and 0 deletions

View File

@ -2,12 +2,22 @@ use std::collections::HashMap;
use matrix_sdk_crypto::Device as InnerDevice;
/// An E2EE capable Matrix device.
pub struct Device {
/// The device owner.
pub user_id: String,
/// The unique ID of the device.
pub device_id: String,
/// The published public identity keys of the devices
///
/// A map from the key type (e.g. curve25519) to the base64 encoded key.
pub keys: HashMap<String, String>,
/// The supported algorithms of the device.
pub algorithms: Vec<String>,
/// The human readable name of the device.
pub display_name: Option<String>,
/// A flag indicating if the device has been blocked, blocked devices don't
/// receive any room keys from us.
pub is_blocked: bool,
}