Struct matrix_sdk_crypto::ReadOnlyUserIdentity
source · pub struct ReadOnlyUserIdentity { /* private fields */ }
Expand description
Struct representing a cross signing identity of a user.
This is the user identity of a user that isn’t our own. Other users will only contain a master key and a self signing key, meaning that only device signatures can be checked with this identity.
Implementations§
source§impl ReadOnlyUserIdentity
impl ReadOnlyUserIdentity
sourcepub fn master_key(&self) -> &MasterPubkey
pub fn master_key(&self) -> &MasterPubkey
Get the public master key of the identity.
sourcepub fn self_signing_key(&self) -> &SelfSigningPubkey
pub fn self_signing_key(&self) -> &SelfSigningPubkey
Get the public self-signing key of the identity.
Trait Implementations§
source§impl Clone for ReadOnlyUserIdentity
impl Clone for ReadOnlyUserIdentity
source§fn clone(&self) -> ReadOnlyUserIdentity
fn clone(&self) -> ReadOnlyUserIdentity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ReadOnlyUserIdentity
impl Debug for ReadOnlyUserIdentity
source§impl<'de> Deserialize<'de> for ReadOnlyUserIdentity
impl<'de> Deserialize<'de> for ReadOnlyUserIdentity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<ReadOnlyUserIdentity> for ReadOnlyUserIdentities
impl From<ReadOnlyUserIdentity> for ReadOnlyUserIdentities
source§fn from(identity: ReadOnlyUserIdentity) -> Self
fn from(identity: ReadOnlyUserIdentity) -> Self
source§impl PartialEq for ReadOnlyUserIdentity
impl PartialEq for ReadOnlyUserIdentity
source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
The PartialEq
implementation compares several attributes, including
the user ID, key material, usage, and, notably, the signatures of
the master key.
This approach contrasts with the PartialEq
implementation of the
MasterPubkey
, and SelfSigningPubkey
types,
where the signatures are disregarded. This distinction arises from our
treatment of identity as the combined representation of cross-signing
keys and the associated verification state.
The verification state of an identity depends on the signatures of the
master key, requiring their inclusion in our PartialEq
implementation.