Struct ruma::encryption::DeviceKeys [−][src]
pub struct DeviceKeys { pub user_id: UserId, pub device_id: Box<DeviceId, Global>, pub algorithms: Vec<EventEncryptionAlgorithm, Global>, 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: Box<DeviceId, Global>
The ID of the device these keys belong to. Must match the device ID used when logging in.
algorithms: Vec<EventEncryptionAlgorithm, Global>
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: Box<DeviceId, Global>,
algorithms: Vec<EventEncryptionAlgorithm, Global>,
keys: BTreeMap<DeviceKeyId, String>,
signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>
) -> DeviceKeys
pub fn new(
user_id: UserId,
device_id: Box<DeviceId, Global>,
algorithms: Vec<EventEncryptionAlgorithm, Global>,
keys: BTreeMap<DeviceKeyId, String>,
signatures: BTreeMap<UserId, BTreeMap<DeviceKeyId, String>>
) -> DeviceKeys
Creates a new DeviceKeys
from the given user id, device id, algorithms, keys and
signatures.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DeviceKeys, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DeviceKeys, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. 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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more