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 'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'async_trait + ?Sized,
Self: Sync + '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 'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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 'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
<I as IntoIterator>::IntoIter: Send,
Self: Sync + '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 'life0: 'async_trait,
C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + '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 'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + '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<RawSyncOrStrippedState<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent<StateKey = EmptyStateKey> + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'async_trait + ?Sized,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'async_trait + ?Sized,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Self: Sync + '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
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
<I as IntoIterator>::IntoIter: Send,
Self: Sync + '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
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + StaticStateEventContent + RedactContent + 'async_trait,
<C as StateEventContent>::StateKey: Borrow<K>,
<C as RedactContent>::Redacted: RedactedStateEventContent,
K: AsRef<str> + Sync + 'a + 'async_trait,
I: IntoIterator<Item = &'a K> + Send + 'async_trait,
<I as IntoIterator>::IntoIter: Send,
Self: Sync + '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
'life0: 'async_trait,
C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + '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
'life0: 'async_trait,
C: StaticEventContent + GlobalAccountDataEventContent + 'async_trait,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + '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
'life0: 'async_trait,
'life1: 'async_trait,
C: StaticEventContent + RoomAccountDataEventContent + 'async_trait,
Self: Sync + '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<RawSyncOrStrippedState<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + '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<RawSyncOrStrippedState<RoomMemberEventContent>>, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + '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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.