[][src]Struct matrix_sdk_crypto::Sas

pub struct Sas { /* fields omitted */ }

Short authentication string object.

Implementations

impl Sas[src]

pub fn user_id(&self) -> &UserId[src]

Get our own user id.

pub fn device_id(&self) -> &DeviceId[src]

Get our own device id.

pub fn other_user_id(&self) -> &UserId[src]

Get the user id of the other side.

pub fn other_device_id(&self) -> &DeviceId[src]

Get the device id of the other side.

pub fn other_device(&self) -> ReadOnlyDevice[src]

Get the device of the other user.

pub fn flow_id(&self) -> &str[src]

Get the unique ID that identifies this SAS verification flow.

pub fn accept(&self) -> Option<ToDeviceRequest>[src]

Accept the SAS verification.

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

pub async fn confirm(
    &self
) -> Result<(Option<ToDeviceRequest>, Option<SignatureUploadRequest>), CryptoStoreError>
[src]

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.

pub fn cancel(&self) -> Option<ToDeviceRequest>[src]

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.

pub fn timed_out(&self) -> bool[src]

Has the SAS verification flow timed out.

pub fn can_be_presented(&self) -> bool[src]

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

pub fn is_done(&self) -> bool[src]

Is the SAS flow done.

pub fn is_canceled(&self) -> bool[src]

Is the SAS flow canceled.

pub fn emoji(&self) -> Option<Vec<(&'static str, &'static str)>>[src]

Get the emoji version of the short auth string.

Returns None if we can't yet present the short auth string, otherwise a Vec of tuples with the emoji and description.

pub fn decimals(&self) -> Option<(u16, u16, u16)>[src]

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

impl Clone for Sas[src]

impl Debug for Sas[src]

Auto Trait Implementations

impl !RefUnwindSafe for Sas[src]

impl Send for Sas[src]

impl Sync for Sas[src]

impl Unpin for Sas[src]

impl !UnwindSafe for Sas[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsyncTraitDeps for T where
    T: Send + Sync + Debug
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,