Struct matrix_sdk::encryption::identities::MasterPubkey
[−]pub struct MasterPubkey(_);Available on crate feature
e2e-encryption only.Expand description
Wrapper for a cross signing key marking it as the master key.
Master keys are used to sign other cross signing keys, the self signing and user signing keys of an user will be signed by their master key.
Implementations
impl MasterPubkey
impl MasterPubkey
pub fn user_id(&self) -> &UserId
pub fn user_id(&self) -> &UserId
Get the user id of the master key’s owner.
pub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
pub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
Get the keys map of containing the master keys.
pub fn usage(&self) -> &[KeyUsage]
pub fn usage(&self) -> &[KeyUsage]
Get the list of KeyUsage that is set for this key.
pub fn signatures(&self) -> &Signatures
pub fn signatures(&self) -> &Signatures
Get the signatures map of this cross signing key.
pub fn get_key(&self, key_id: &DeviceKeyId) -> Option<&SigningKey>
pub fn get_key(&self, key_id: &DeviceKeyId) -> Option<&SigningKey>
Get the master key with the given key id.
Arguments
key_id- The id of the key that should be fetched.
pub fn get_first_key(&self) -> Option<Ed25519PublicKey>
pub fn get_first_key(&self) -> Option<Ed25519PublicKey>
Get the first available master key.
There’s usually only a single master key so this will usually fetch the only key.
Trait Implementations
impl AsRef<CrossSigningKey> for MasterPubkey
impl AsRef<CrossSigningKey> for MasterPubkey
fn as_ref(&self) -> &CrossSigningKey
fn as_ref(&self) -> &CrossSigningKey
Converts this type into a shared reference of the (usually inferred) input type.
impl Clone for MasterPubkey
impl Clone for MasterPubkey
fn clone(&self) -> MasterPubkey
fn clone(&self) -> MasterPubkey
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Debug for MasterPubkey
impl Debug for MasterPubkey
impl<'de> Deserialize<'de> for MasterPubkey
impl<'de> Deserialize<'de> for MasterPubkey
fn deserialize<__D>(
__deserializer: __D
) -> Result<MasterPubkey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MasterPubkey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl From<CrossSigningKey> for MasterPubkey
impl From<CrossSigningKey> for MasterPubkey
fn from(key: CrossSigningKey) -> MasterPubkey
fn from(key: CrossSigningKey) -> MasterPubkey
Converts to this type from the input type.
impl<'a> IntoIterator for &'a MasterPubkey
impl<'a> IntoIterator for &'a MasterPubkey
type Item = (&'a OwnedDeviceKeyId, &'a SigningKey)
type Item = (&'a OwnedDeviceKeyId, &'a SigningKey)
The type of the elements being iterated over.
type IntoIter = Iter<'a, OwnedDeviceKeyId, SigningKey>
type IntoIter = Iter<'a, OwnedDeviceKeyId, SigningKey>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <&'a MasterPubkey as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a MasterPubkey as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
impl PartialEq<MasterPubkey> for MasterPubkey
impl PartialEq<MasterPubkey> for MasterPubkey
fn eq(&self, other: &MasterPubkey) -> bool
fn eq(&self, other: &MasterPubkey) -> bool
impl Serialize for MasterPubkey
impl Serialize for MasterPubkey
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 MasterPubkey
impl Send for MasterPubkey
impl Sync for MasterPubkey
impl Unpin for MasterPubkey
impl UnwindSafe for MasterPubkey
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