pub struct Store { /* private fields */ }
Expand description

A wrapper for our CryptoStore trait object.

This is needed because we want to have a generic interface so we can store/restore objects that we can serialize. Since trait objects and generics don’t mix let the CryptoStore store strings and this wrapper adds the generic interface on top.

Implementations

Create a new Store

UserId associated with this store

DeviceId associated with this store

The Account associated with this store

PrivateCrossSigningIdentity associated with this store

Save the given Sessions to the store

Get the display name of our own device.

Get the read-only device associated with device_id for user_id

Get the read-only version of all the devices that the given user has.

Note: This doesn’t return our own device.

Get the read-only version of all the devices that the given user has.

Note: This does also return our own device.

Get a device for the given user with the given curve25519 key.

Note: This doesn’t return our own device.

Get all devices associated with the given user_id

Note: This doesn’t return our own device.

Get all devices associated with the given user_id

Note: This does also return our own device.

Get a Device copy associated with device_id for user_id

Get the Identity of user_id

Try to export the secret with the given secret name.

The exported secret will be encoded as unpadded base64. Returns Null if the secret can’t be found.

Arguments
  • secret_name - The name of the secret that should be exported.

Import the Cross Signing Keys

Import the given secret named secret_name into the keystore.

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

The resulting type after dereferencing.

Dereferences the value.

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.

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