Struct ruma::encryption::CrossSigningKey
source · pub struct CrossSigningKey {
pub user_id: OwnedUserId,
pub usage: Vec<KeyUsage, Global>,
pub keys: BTreeMap<OwnedDeviceKeyId, String, Global>,
pub signatures: BTreeMap<OwnedUserId, BTreeMap<OwnedDeviceKeyId, String, Global>, Global>,
}
Expand description
A cross signing key.
Fields§
§user_id: OwnedUserId
The ID of the user the key belongs to.
usage: Vec<KeyUsage, Global>
What the key is used for.
keys: BTreeMap<OwnedDeviceKeyId, String, Global>
The public key.
The object must have exactly one property.
signatures: BTreeMap<OwnedUserId, BTreeMap<OwnedDeviceKeyId, String, Global>, Global>
Signatures of the key.
Only optional for master key.
Implementations§
source§impl CrossSigningKey
impl CrossSigningKey
sourcepub fn new(
user_id: OwnedUserId,
usage: Vec<KeyUsage, Global>,
keys: BTreeMap<OwnedDeviceKeyId, String, Global>,
signatures: BTreeMap<OwnedUserId, BTreeMap<OwnedDeviceKeyId, String, Global>, Global>
) -> CrossSigningKey
Available on crate feature events
only.
pub fn new( user_id: OwnedUserId, usage: Vec<KeyUsage, Global>, keys: BTreeMap<OwnedDeviceKeyId, String, Global>, signatures: BTreeMap<OwnedUserId, BTreeMap<OwnedDeviceKeyId, String, Global>, Global> ) -> CrossSigningKey
events
only.Creates a new CrossSigningKey
with the given user ID, usage, keys and signatures.
Trait Implementations§
source§impl Clone for CrossSigningKey
impl Clone for CrossSigningKey
source§fn clone(&self) -> CrossSigningKey
fn clone(&self) -> CrossSigningKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CrossSigningKey
impl Debug for CrossSigningKey
source§impl<'de> Deserialize<'de> for CrossSigningKey
impl<'de> Deserialize<'de> for CrossSigningKey
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<CrossSigningKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<CrossSigningKey, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for CrossSigningKey
impl Serialize for CrossSigningKey
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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 CrossSigningKey
impl Send for CrossSigningKey
impl Sync for CrossSigningKey
impl Unpin for CrossSigningKey
impl UnwindSafe for CrossSigningKey
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
Mutably borrows from an owned value. Read more