Skip to main content

StateMap

Type Alias StateMap 

Source
pub type StateMap<Id> = BTreeMap<TypeStateKey, Id>;
Expand description

A mapping of event type and state_key to some value T, usually an EventId.

Aliased Type§

pub struct StateMap<Id> { /* private fields */ }

Trait Implementations§

Source§

impl<'a> FetchState for &'a StateMap<PduEvent>

Source§

type Pdu = &'a Pdu

Event representation returned by this state snapshot. Read more
Source§

fn get( self, ty: StateEventType, key: StateKey, ) -> impl Future<Output = Result<Self::Pdu>> + Send

Reads the event for an exact state tuple. Read more
Source§

fn room_create_event( self, ) -> impl Future<Output = Result<RoomCreateEvent<Self::Pdu>>> + Send

Reads the room creation event. Read more
Source§

fn user_membership( self, user_id: &UserId, ) -> impl Future<Output = Result<MembershipState>> + Send

Reads a user membership from the state snapshot. Read more
Source§

fn room_power_levels_event( self, ) -> impl Future<Output = Result<Option<RoomPowerLevelsEvent<Self::Pdu>>>> + Send

Reads the optional room power levels event. Read more
Source§

fn join_rule(self) -> impl Future<Output = Result<JoinRule>> + Send

Reads the current room join rule. Read more
Source§

fn room_third_party_invite_event( self, token: &str, ) -> impl Future<Output = Result<Option<RoomThirdPartyInviteEvent<Self::Pdu>>>> + Send

Reads the invitation matching a third-party token. Read more