Struct matrix_sdk_crypto::Sas[][src]

pub struct Sas { /* fields omitted */ }
Expand description

Short authentication string object.

Implementations

Get our own user id.

Get our own device id.

Get the user id of the other side.

Get the device id of the other side.

Get the device of the other user.

Get the unique ID that identifies this SAS verification flow.

Get the room id if the verification is happening inside a room.

Does this verification flow support displaying emoji for the short authentication string.

Did this verification flow start from a verification request.

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

Have we confirmed that the short auth string matches.

Has the verification been accepted by both parties.

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

Did we initiate the verification flow.

Accept the SAS verification.

This does nothing if the verification was already accepted, otherwise it returns an AcceptEventContent that needs to be sent out.

Accept the SAS verification customizing the accept method.

This does nothing if the verification was already accepted, otherwise it returns an AcceptEventContent that needs to be sent out.

Specify a function modifying the attributes of the accept request.

Confirm the Sas verification.

This confirms that the short auth strings match on both sides.

Does nothing if we’re not in a state where we can confirm the short auth string, otherwise returns a MacEventContent that needs to be sent to the server.

Cancel the verification.

This cancels the verification with the CancelCode::User.

Returns None if the Sas object is already in a canceled state, otherwise it returns a request that needs to be sent out.

Cancel the verification.

This cancels the verification with given CancelCode.

Note: This method should generally not be used, the cancel() method should be preferred. The SDK will automatically cancel with the approprate cancel code, user initiated cancellations should only cancel with the CancelCode::User

Returns None if the Sas object is already in a canceled state, otherwise it returns a request that needs to be sent out.

Has the SAS verification flow timed out.

Are we in a state where we can show the short auth string.

Is the SAS flow done.

Is the SAS flow canceled.

Get the emoji version of the short auth string.

Returns None if we can’t yet present the short auth string, otherwise seven tuples containing the emoji and description.

Get the index of the emoji representing the short auth string

Returns None if we can’t yet present the short auth string, otherwise seven u8 numbers in the range from 0 to 63 inclusive which can be converted to an emoji using the relevant spec entry.

Get the decimal version of the short auth string.

Returns None if we can’t yet present the short auth string, otherwise a tuple containing three 4-digit integers that represent the short auth string.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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)

recently added

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.