Struct matrix_sdk_crypto::OwnUserIdentity
source · pub struct OwnUserIdentity { /* private fields */ }
Expand description
Struct representing a cross signing identity of a user.
This is the user identity of a user that is 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.
This struct wraps a read-only version of the struct and allows verifications to be requested to verify our own device with the user identity.
Implementations§
source§impl OwnUserIdentity
impl OwnUserIdentity
sourcepub async fn verify(&self) -> Result<SignatureUploadRequest, SignatureError>
pub async fn verify(&self) -> Result<SignatureUploadRequest, SignatureError>
Mark our user identity as verified.
This will mark the identity locally as verified and sign it with our own device.
Returns a signature upload request that needs to be sent out.
sourcepub async fn request_verification(
&self
) -> Result<(VerificationRequest, OutgoingVerificationRequest), CryptoStoreError>
pub async fn request_verification( &self ) -> Result<(VerificationRequest, OutgoingVerificationRequest), CryptoStoreError>
Send a verification request to our other devices.
sourcepub async fn request_verification_with_methods(
&self,
methods: Vec<VerificationMethod>
) -> Result<(VerificationRequest, OutgoingVerificationRequest), CryptoStoreError>
pub async fn request_verification_with_methods( &self, methods: Vec<VerificationMethod> ) -> Result<(VerificationRequest, OutgoingVerificationRequest), CryptoStoreError>
Send a verification request to our other devices while specifying our supported methods.
§Arguments
methods
- The verification methods that we’re supporting.
sourcepub async fn trusts_our_own_device(&self) -> Result<bool, CryptoStoreError>
pub async fn trusts_our_own_device(&self) -> Result<bool, CryptoStoreError>
Does our user identity trust our own device, i.e. have we signed our own device keys with our self-signing key.
Methods from Deref<Target = ReadOnlyOwnUserIdentity>§
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.
sourcepub fn user_signing_key(&self) -> &UserSigningPubkey
pub fn user_signing_key(&self) -> &UserSigningPubkey
Get the public user-signing key of the identity.
sourcepub fn mark_as_verified(&self)
pub fn mark_as_verified(&self)
Mark our identity as verified.
sourcepub fn is_verified(&self) -> bool
pub fn is_verified(&self) -> bool
Check if our identity is verified.
Trait Implementations§
source§impl Clone for OwnUserIdentity
impl Clone for OwnUserIdentity
source§fn clone(&self) -> OwnUserIdentity
fn clone(&self) -> OwnUserIdentity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OwnUserIdentity
impl Debug for OwnUserIdentity
source§impl Deref for OwnUserIdentity
impl Deref for OwnUserIdentity
source§impl From<OwnUserIdentity> for UserIdentities
impl From<OwnUserIdentity> for UserIdentities
source§fn from(i: OwnUserIdentity) -> Self
fn from(i: OwnUserIdentity) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for OwnUserIdentity
impl Send for OwnUserIdentity
impl Sync for OwnUserIdentity
impl Unpin for OwnUserIdentity
impl !UnwindSafe for OwnUserIdentity
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>