Trait matrix_sdk_base::store::StateStoreExt
source · pub trait StateStoreExt: StateStore {
// Provided methods
fn get_state_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_state_event_static_for_key<'life0, 'life1, 'life2, 'async_trait, C, K>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 K,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + ?Sized + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn get_state_events_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_state_events_for_keys_static<'a, 'life0, 'life1, 'async_trait, C, K, I>(
&'life0 self,
room_id: &'life1 RoomId,
state_keys: I,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sized + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
I::IntoIter: Send,
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_account_data_event_static<'life0, 'async_trait, C>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<GlobalAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_room_account_data_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<RoomAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>
where C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_member_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawMemberEvent>, Self::Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}
Expand description
Convenience functionality for state stores.
Provided Methods§
sourcefn get_state_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a specific state event of statically-known type.
§Arguments
room_id
- The id of the room the state event was received for.
sourcefn get_state_event_static_for_key<'life0, 'life1, 'life2, 'async_trait, C, K>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 K,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + ?Sized + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_state_event_static_for_key<'life0, 'life1, 'life2, 'async_trait, C, K>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 K,
) -> Pin<Box<dyn Future<Output = Result<Option<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + ?Sized + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get a specific state event of statically-known type.
§Arguments
room_id
- The id of the room the state event was received for.
sourcefn get_state_events_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state_events_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::Redacted: RedactedStateEventContent,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a list of state events of a statically-known type for a given room.
§Arguments
room_id
- The id of the room to find events for.
sourcefn get_state_events_for_keys_static<'a, 'life0, 'life1, 'async_trait, C, K, I>(
&'life0 self,
room_id: &'life1 RoomId,
state_keys: I,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sized + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
I::IntoIter: Send,
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state_events_for_keys_static<'a, 'life0, 'life1, 'async_trait, C, K, I>(
&'life0 self,
room_id: &'life1 RoomId,
state_keys: I,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawSyncOrStrippedState<C>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
C::StateKey: Borrow<K>,
C::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sized + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
I::IntoIter: Send,
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a list of state events of a statically-known type for a given room and given state keys.
§Arguments
-
room_id
- The id of the room to find events for. -
state_keys
- The list of state keys to find.
sourcefn get_account_data_event_static<'life0, 'async_trait, C>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<GlobalAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_account_data_event_static<'life0, 'async_trait, C>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<GlobalAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get an event of a statically-known type from the account data store.
sourcefn get_room_account_data_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<RoomAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_room_account_data_event_static<'life0, 'life1, 'async_trait, C>(
&'life0 self,
room_id: &'life1 RoomId,
) -> Pin<Box<dyn Future<Output = Result<Option<Raw<RoomAccountDataEvent<C>>>, Self::Error>> + Send + 'async_trait>>where
C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an event of a statically-known type from the room account data store.
§Arguments
room_id
- The id of the room for which the room account data event should be fetched.
sourcefn get_member_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawMemberEvent>, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_member_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
room_id: &'life1 RoomId,
state_key: &'life2 UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawMemberEvent>, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
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.
Object Safety§
This trait is not object safe.