pub struct VerificationRequest { /* private fields */ }
Available on crate feature e2e-encryption only.
Expand description

An object controlling the interactive verification flow.

Implementations

Has this verification finished.

Has the verification been cancelled.

Get the transaction id of this verification request

Get info about the cancellation if the verification request has been cancelled.

Get our own user id.

Has the verification request been answered by another device.

Is the verification request ready to start a verification flow.

Did we initiate the verification flow.

Get the user id of the other user participating in this verification flow.

Is this a verification that is veryfying one of our own devices.

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.

Accept the verification request.

This method will accept the request and signal by default that it supports the m.sas.v1, the m.qr_code.show.v1, and m.reciprocate.v1 method. If the qrcode feature is disabled it will only signal that it supports the m.sas.v1 method.

If QR code scanning should be supported or QR code showing shouldn’t be supported the accept_with_methods() method should be used instead.

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.
Available on crate feature qrcode only.

Generate a QR code

Available on crate feature qrcode only.

Start a QR code verification by providing a scanned QR code for this verification flow.

Returns an Error if the QR code isn’t valid or sending a reciprocate event to the other side fails, None if the verification request isn’t in the ready state or we don’t support QR code verification, otherwise a newly created QrVerification object which will be used for the remainder of the verification flow.

Transition from this verification request into a SAS verification flow.

Cancel the verification request

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more