Struct matrix_sdk_crypto::UserIdentity [−][src]
pub struct UserIdentity { /* fields omitted */ }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.
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
Manually verify this user.
This method will attempt to sign the user identity using our private cross signing key.
This method fails if we don’t have the private part of our user-signing key.
Returns a request that needs to be sent out for the user to be marked as verified.
pub async fn request_verification(
&self,
room_id: &RoomId,
request_event_id: &EventId,
methods: Option<Vec<VerificationMethod>>
) -> VerificationRequest
pub async fn request_verification(
&self,
room_id: &RoomId,
request_event_id: &EventId,
methods: Option<Vec<VerificationMethod>>
) -> VerificationRequest
Create a VerificationRequest object after the verification request
content has been sent out.
pub async fn verification_request_content(
&self,
methods: Option<Vec<VerificationMethod>>
) -> KeyVerificationRequestEventContent
pub async fn verification_request_content(
&self,
methods: Option<Vec<VerificationMethod>>
) -> KeyVerificationRequestEventContent
Send a verification request to the given user.
The returned content needs to be sent out into a DM room with the given user.
After the content has been sent out a VerificationRequest can be
started with the request_verification() method.
Methods from Deref<Target = ReadOnlyUserIdentity>
Get the public master key of the identity.
Get the public self-signing key of the identity.
Trait Implementations
type Target = ReadOnlyUserIdentity
type Target = ReadOnlyUserIdentity
The resulting type after dereferencing.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for UserIdentity
impl Send for UserIdentity
impl Sync for UserIdentity
impl Unpin for UserIdentity
impl !UnwindSafe for UserIdentity
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more