pub struct StateStore<DB: SupportedDatabase> { /* private fields */ }
Expand description

SQL State Storage for matrix-sdk

Implementations

Create a new State Store and automtaically performs migrations

Errors

This function will return an error if the migration cannot be applied

Unlocks the e2e encryption database

Errors

This function will fail if the database could not be unlocked

Unlocks the e2e encryption database with password

Errors

This function will fail if the passphrase is wrong

Trait Implementations

Load an account that was previously stored.

Save the given account in the store. Read more

Try to load a private cross signing identity, if one is stored.

Save the set of changes to the store. Read more

Get all the sessions that belong to the given sender key. Read more

Get the inbound group session from our store. Read more

Get all the inbound group sessions we have stored.

Get the number inbound group sessions we have and how many of them are backed up. Read more

Get all the inbound group sessions we have not backed up yet.

Reset the backup state of all the stored inbound group sessions.

Get the backup keys we have stored.

Get the outbound group sessions we have stored that is used for the given room. Read more

Is the given user already tracked.

Are there any tracked users that are marked as dirty.

Set of users that we need to query keys for. This is a subset of the tracked users. Read more

Get all tracked users we know about.

Add an user for tracking. Read more

Get the device for the given user with the given device ID. Read more

Get all the devices of the given user. Read more

Get the user identity that is attached to the given user id. Read more

Check if a hash for an Olm message stored in the database.

Get an outgoing secret request that we created that matches the given request id. Read more

Get an outgoing key request that we created that matches the given requested key info. Read more

Get all outgoing secret requests that we have in the store.

Delete an outgoing key request that we created that matches the given request id. Read more

Formats the value using the given formatter. Read more

Save the given filter id under the given name.

Arguments
  • filter_name - The name that should be used to store the filter id.

  • filter_id - The filter id that should be stored in the state store.

Save the set of state changes in the store.

Get the filter id that was stored under the given filter name.

Arguments
  • filter_name - The name that was used to store the filter id.

Get the last stored sync token.

Get the stored presence event for the given user.

Arguments
  • user_id - The id of the user for which we wish to fetch the presence event for.

Get a state event out of the state store.

Arguments
  • room_id - The id of the room the state event was received for.

  • event_type - The event type of the state event.

Get a list of state events for a given room and StateEventType.

Arguments
  • room_id - The id of the room to find events for.

  • event_type - The event type.

Get the current profile for the given user in the given room.

Arguments
  • room_id - The room id the profile is used in.

  • user_id - The id of the user the profile belongs to.

Get the MemberEvent for the given state key in the given room id.

Arguments
  • room_id - The room id the member event belongs to.

  • state_key - The user id that the member event defines the state for.

Get all the user ids of members for a given room, for stripped and regular rooms alike.

Get all the user ids of members that are in the invited state for a given room, for stripped and regular rooms alike.

Get all the user ids of members that are in the joined state for a given room, for stripped and regular rooms alike.

Get all the pure RoomInfos the store knows about.

Get all the pure RoomInfos the store knows about.

Get all the users that use the given display name in the given room.

Arguments
  • room_id - The id of the room for which the display name users should be fetched for.

  • display_name - The display name that the users use.

Get an event out of the account data store.

Arguments
  • event_type - The event type of the account data event.

Get an event out of the room account data store.

Arguments
  • room_id - The id of the room for which the room account data event should be fetched.

  • event_type - The event type of the room account data event.

Get an event out of the user room receipt store.

Arguments
  • room_id - The id of the room for which the receipt should be fetched.

  • receipt_type - The type of the receipt.

  • user_id - The id of the user for who the receipt should be fetched.

Get events out of the event room receipt store.

Arguments
  • room_id - The id of the room for which the receipts should be fetched.

  • receipt_type - The type of the receipts.

  • event_id - The id of the event for which the receipts should be fetched.

Get arbitrary data from the custom store

Arguments
  • key - The key to fetch data for

Put arbitrary data into the custom store

Arguments
  • key - The key to insert data into

  • value - The value to insert

Add a media file’s content in the media store.

Arguments
  • request - The MediaRequest of the file.

  • content - The content of the file.

Get a media file’s content out of the media store.

Arguments
  • request - The MediaRequest of the file.

Removes a media file’s content from the media store.

Arguments
  • request - The MediaRequest of the file.

Removes all the media files’ content associated to an MxcUri from the media store.

Arguments
  • uri - The MxcUri of the media files.

Removes a room and all elements associated from the state store.

Arguments
  • room_id - The RoomId of the room to delete.

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 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