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
sourceimpl 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
pub fn new(
user_id: OwnedUserId,
usage: Vec<KeyUsage, Global>,
keys: BTreeMap<OwnedDeviceKeyId, String, Global>,
signatures: BTreeMap<OwnedUserId, BTreeMap<OwnedDeviceKeyId, String, Global>, Global>
) -> CrossSigningKey
Creates a new CrossSigningKey
with the given user ID, usage, keys and signatures.
Trait Implementations
sourceimpl Clone for CrossSigningKey
impl Clone for CrossSigningKey
sourcefn clone(&self) -> CrossSigningKey
fn clone(&self) -> CrossSigningKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CrossSigningKey
impl Debug for CrossSigningKey
sourceimpl<'de> Deserialize<'de> for CrossSigningKey
impl<'de> Deserialize<'de> for CrossSigningKey
sourcefn 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
sourceimpl Serialize for CrossSigningKey
impl Serialize for CrossSigningKey
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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