pub trait StateStore: AsyncTraitDeps {
    type Error: Debug + Into<StoreError> + From<Error>;

Show 31 methods // Required methods fn get_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1> ) -> Pin<Box<dyn Future<Output = Result<Option<StateStoreDataValue>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn set_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1>, value: StateStoreDataValue ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn save_changes<'life0, 'life1, 'async_trait>( &'life0 self, changes: &'life1 StateChanges ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_presence_event<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<PresenceEvent>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_presence_events<'life0, 'life1, 'async_trait>( &'life0 self, user_ids: &'life1 [OwnedUserId] ) -> Pin<Box<dyn Future<Output = Result<Vec<Raw<PresenceEvent>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_state_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType, state_key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<Option<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_state_events<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType ) -> Pin<Box<dyn Future<Output = Result<Vec<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_state_events_for_keys<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType, state_keys: &'life2 [&'life3 str] ) -> Pin<Box<dyn Future<Output = Result<Vec<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait; fn get_profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, user_id: &'life2 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<MinimalStateEvent<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_profiles<'a, 'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, user_ids: &'a [OwnedUserId] ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<&'a UserId, MinimalStateEvent<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>> where 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, memberships: RoomMemberships ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_invited_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_joined_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_room_infos<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<RoomInfo>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_stripped_room_infos<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<RoomInfo>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_users_with_display_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, display_name: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<BTreeSet<OwnedUserId>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_users_with_display_names<'a, 'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, display_names: &'a [String] ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<&'a str, BTreeSet<OwnedUserId>>, Self::Error>> + Send + 'async_trait>> where 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_account_data_event<'life0, 'async_trait>( &'life0 self, event_type: GlobalAccountDataEventType ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<AnyGlobalAccountDataEvent>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_room_account_data_event<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: RoomAccountDataEventType ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<AnyRoomAccountDataEvent>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_user_room_receipt_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, receipt_type: ReceiptType, thread: ReceiptThread, user_id: &'life2 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<(OwnedEventId, Receipt)>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_event_room_receipt_events<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, receipt_type: ReceiptType, thread: ReceiptThread, event_id: &'life2 EventId ) -> Pin<Box<dyn Future<Output = Result<Vec<(OwnedUserId, Receipt)>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn set_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8], value: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn add_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest, content: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_media_content_for_uri<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 MxcUri ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_room<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; // Provided method fn set_custom_value_no_read<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8], value: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: Sync + 'async_trait { ... }
}
Expand description

An abstract state store trait that can be used to implement different stores for the SDK.

Required Associated Types§

source

type Error: Debug + Into<StoreError> + From<Error>

The error type used by this state store.

Required Methods§

source

fn get_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1> ) -> Pin<Box<dyn Future<Output = Result<Option<StateStoreDataValue>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get key-value data from the store.

§Arguments
  • key - The key to fetch data for.
source

fn set_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1>, value: StateStoreDataValue ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Put key-value data into the store.

§Arguments
  • key - The key to identify the data in the store.

  • value - The data to insert.

Panics if the key and value variants do not match.

source

fn remove_kv_data<'life0, 'life1, 'async_trait>( &'life0 self, key: StateStoreDataKey<'life1> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove key-value data from the store.

§Arguments
  • key - The key to remove the data for.
source

fn save_changes<'life0, 'life1, 'async_trait>( &'life0 self, changes: &'life1 StateChanges ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Save the set of state changes in the store.

source

fn get_presence_event<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<PresenceEvent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

fn get_presence_events<'life0, 'life1, 'async_trait>( &'life0 self, user_ids: &'life1 [OwnedUserId] ) -> Pin<Box<dyn Future<Output = Result<Vec<Raw<PresenceEvent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get the stored presence events for the given users.

§Arguments
  • user_ids - The IDs of the users to fetch the presence events for.
source

fn get_state_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType, state_key: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<Option<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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.

source

fn get_state_events<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType ) -> Pin<Box<dyn Future<Output = Result<Vec<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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.

source

fn get_state_events_for_keys<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: StateEventType, state_keys: &'life2 [&'life3 str] ) -> Pin<Box<dyn Future<Output = Result<Vec<RawAnySyncOrStrippedState>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

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

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

  • event_type - The event type.

  • state_keys - The list of state keys to find.

source

fn get_profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, user_id: &'life2 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<MinimalStateEvent<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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.

source

fn get_profiles<'a, 'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, user_ids: &'a [OwnedUserId] ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<&'a UserId, MinimalStateEvent<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get the current profiles for the given users in the given room.

§Arguments
  • room_id - The ID of the room the profiles are used in.

  • user_ids - The IDs of the users the profiles belong to.

source

fn get_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, memberships: RoomMemberships ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

source

fn get_invited_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

👎Deprecated: Use get_user_ids with RoomMemberships::INVITE instead.

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

source

fn get_joined_user_ids<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedUserId>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

👎Deprecated: Use get_user_ids with RoomMemberships::JOIN instead.

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

source

fn get_room_infos<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<RoomInfo>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get all the pure RoomInfos the store knows about.

source

fn get_stripped_room_infos<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<RoomInfo>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

👎Deprecated: Use get_room_infos instead and filter by RoomState

Get all the pure RoomInfos the store knows about.

source

fn get_users_with_display_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, display_name: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<BTreeSet<OwnedUserId>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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.

source

fn get_users_with_display_names<'a, 'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, display_names: &'a [String] ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<&'a str, BTreeSet<OwnedUserId>>, Self::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

§Arguments
  • room_id - The ID of the room to fetch the display names for.

  • display_names - The display names that the users use.

source

fn get_account_data_event<'life0, 'async_trait>( &'life0 self, event_type: GlobalAccountDataEventType ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<AnyGlobalAccountDataEvent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get an event out of the account data store.

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

fn get_room_account_data_event<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, event_type: RoomAccountDataEventType ) -> Pin<Box<dyn Future<Output = Result<Option<Raw<AnyRoomAccountDataEvent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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.

source

fn get_user_room_receipt_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, receipt_type: ReceiptType, thread: ReceiptThread, user_id: &'life2 UserId ) -> Pin<Box<dyn Future<Output = Result<Option<(OwnedEventId, Receipt)>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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.

  • thread - The thread containing this receipt.

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

source

fn get_event_room_receipt_events<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, room_id: &'life1 RoomId, receipt_type: ReceiptType, thread: ReceiptThread, event_id: &'life2 EventId ) -> Pin<Box<dyn Future<Output = Result<Vec<(OwnedUserId, Receipt)>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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.

  • thread - The thread containing this receipt.

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

source

fn get_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get arbitrary data from the custom store

§Arguments
  • key - The key to fetch data for
source

fn set_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8], value: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Put arbitrary data into the custom store, return the data previously stored

§Arguments
  • key - The key to insert data into

  • value - The value to insert

source

fn remove_custom_value<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove arbitrary data from the custom store and return it if existed

§Arguments
  • key - The key to remove data from
source

fn add_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest, content: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

§Arguments
  • request - The MediaRequest of the file.

  • content - The content of the file.

source

fn get_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

§Arguments
  • request - The MediaRequest of the file.
source

fn remove_media_content<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 MediaRequest ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

§Arguments
  • request - The MediaRequest of the file.
source

fn remove_media_content_for_uri<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 MxcUri ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

§Arguments
  • uri - The MxcUri of the media files.
source

fn remove_room<'life0, 'life1, 'async_trait>( &'life0 self, room_id: &'life1 RoomId ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

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

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

Provided Methods§

source

fn set_custom_value_no_read<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8], value: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Sync + 'async_trait,

Put arbitrary data into the custom store, do not attempt to read any previous data

Optimization option for set_custom_values for stores that would perform better withouts the extra read and the caller not needing that data returned. Otherwise this just wraps around set_custom_data and discards the result.

§Arguments
  • key - The key to insert data into

  • value - The value to insert

Implementors§