Struct matrix_sdk_crypto::VerificationRequest [−][src]
pub struct VerificationRequest { /* fields omitted */ }
Expand description
An object controlling key verification requests.
Interactive verification flows usually start with a verification request, this object lets you send and reply to such a verification request.
After the initial handshake the verification flow transitions into one of the verification methods.
Implementations
Create an event content that can be sent as a room event to request verification from the other side. This should be used only for verifications of other users and it should be sent to a room we consider to be a DM with the other user.
Our own user id.
The id of the other user that is participating in this verification request.
The id of the other device that is participating in this verification.
Get the room id if the verification is happening inside a room.
Get info about the cancellation if the verification request has been cancelled.
Has the verification request been answered by another device.
Get the supported verification methods of the other side.
Will be present only if the other side requested the verification or if we’re in the ready state.
Get our own supported verification methods that we advertised.
Will be present only we requested the verification or if we’re in the ready state.
Is this a verification that is veryfying one of our own devices
Did we initiate the verification request
Has the verification flow that was started with this request finished.
Has the verification flow that was started with this request been cancelled.
pub fn accept_with_methods(
&self,
methods: Vec<VerificationMethod>
) -> Option<OutgoingVerificationRequest>
pub fn accept_with_methods(
&self,
methods: Vec<VerificationMethod>
) -> Option<OutgoingVerificationRequest>
Accept the verification request signaling that our client supports the given verification methods.
Arguments
methods
- The methods that we should advertise as supported by us.
Accept the verification request.
This method will accept the request and signal that it supports the
m.sas.v1
, the m.qr_code.show.v1
, and m.reciprocate.v1
method.
m.qr_code.show.v1
will only be signaled if the qrcode
feature is
enabled. This feature is disabled by default. If it’s enabeled and QR
code scanning should be supported or QR code showing shouldn’t be
supported the accept_with_methods()
method should be used
instead.
Cancel the verification request
pub async fn start_sas(
&self
) -> Result<Option<(Sas, OutgoingVerificationRequest)>, CryptoStoreError>
pub async fn start_sas(
&self
) -> Result<Option<(Sas, OutgoingVerificationRequest)>, CryptoStoreError>
Transition from this verification request into a SAS verification flow.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for VerificationRequest
impl Send for VerificationRequest
impl Sync for VerificationRequest
impl Unpin for VerificationRequest
impl !UnwindSafe for VerificationRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more