Struct matrix_sdk_base::StateChanges [−][src]
pub struct StateChanges {Show 15 fields
pub sync_token: Option<String>,
pub session: Option<Session>,
pub account_data: BTreeMap<String, Raw<AnyGlobalAccountDataEvent>>,
pub presence: BTreeMap<UserId, Raw<PresenceEvent>>,
pub members: BTreeMap<RoomId, BTreeMap<UserId, MemberEvent>>,
pub profiles: BTreeMap<RoomId, BTreeMap<UserId, MemberEventContent>>,
pub state: BTreeMap<RoomId, BTreeMap<String, BTreeMap<String, Raw<AnySyncStateEvent>>>>,
pub room_account_data: BTreeMap<RoomId, BTreeMap<String, Raw<AnyRoomAccountDataEvent>>>,
pub room_infos: BTreeMap<RoomId, RoomInfo>,
pub receipts: BTreeMap<RoomId, ReceiptEventContent>,
pub stripped_state: BTreeMap<RoomId, BTreeMap<String, BTreeMap<String, Raw<AnyStrippedStateEvent>>>>,
pub stripped_members: BTreeMap<RoomId, BTreeMap<UserId, StrippedMemberEvent>>,
pub invited_room_info: BTreeMap<RoomId, RoomInfo>,
pub ambiguity_maps: BTreeMap<RoomId, BTreeMap<String, BTreeSet<UserId>>>,
pub notifications: BTreeMap<RoomId, Vec<Notification>>,
}
Expand description
Store state changes and pass them to the StateStore.
Fields
sync_token: Option<String>
The sync token that relates to this update.
session: Option<Session>
A user session, containing an access token and information about the associated user account.
account_data: BTreeMap<String, Raw<AnyGlobalAccountDataEvent>>
A mapping of event type string to AnyBasicEvent
.
presence: BTreeMap<UserId, Raw<PresenceEvent>>
A mapping of UserId
to PresenceEvent
.
members: BTreeMap<RoomId, BTreeMap<UserId, MemberEvent>>
A mapping of RoomId
to a map of users and their MemberEvent
.
profiles: BTreeMap<RoomId, BTreeMap<UserId, MemberEventContent>>
A mapping of RoomId
to a map of users and their MemberEventContent
.
state: BTreeMap<RoomId, BTreeMap<String, BTreeMap<String, Raw<AnySyncStateEvent>>>>
A mapping of RoomId
to a map of event type string to a state key and
AnySyncStateEvent
.
room_account_data: BTreeMap<RoomId, BTreeMap<String, Raw<AnyRoomAccountDataEvent>>>
A mapping of RoomId
to a map of event type string to AnyBasicEvent
.
room_infos: BTreeMap<RoomId, RoomInfo>
A map of RoomId
to RoomInfo
.
receipts: BTreeMap<RoomId, ReceiptEventContent>
A map of RoomId
to ReceiptEventContent
.
stripped_state: BTreeMap<RoomId, BTreeMap<String, BTreeMap<String, Raw<AnyStrippedStateEvent>>>>
A mapping of RoomId
to a map of event type to a map of state key to
AnyStrippedStateEvent
.
stripped_members: BTreeMap<RoomId, BTreeMap<UserId, StrippedMemberEvent>>
A mapping of RoomId
to a map of users and their StrippedMemberEvent
.
invited_room_info: BTreeMap<RoomId, RoomInfo>
A map of RoomId
to RoomInfo
.
ambiguity_maps: BTreeMap<RoomId, BTreeMap<String, BTreeSet<UserId>>>
A map from room id to a map of a display name and a set of user ids that share that display name in the given room.
notifications: BTreeMap<RoomId, Vec<Notification>>
A map of RoomId
to a vector of Notification
s
Implementations
Create a new StateChanges
struct with the given sync_token.
Update the StateChanges
struct with the given PresenceEvent
.
Update the StateChanges
struct with the given RoomInfo
.
Update the StateChanges
struct with the given RoomInfo
.
pub fn add_account_data(
&mut self,
event: AnyGlobalAccountDataEvent,
raw_event: Raw<AnyGlobalAccountDataEvent>
)
pub fn add_account_data(
&mut self,
event: AnyGlobalAccountDataEvent,
raw_event: Raw<AnyGlobalAccountDataEvent>
)
Update the StateChanges
struct with the given AnyBasicEvent
.
pub fn add_room_account_data(
&mut self,
room_id: &RoomId,
event: AnyRoomAccountDataEvent,
raw_event: Raw<AnyRoomAccountDataEvent>
)
pub fn add_room_account_data(
&mut self,
room_id: &RoomId,
event: AnyRoomAccountDataEvent,
raw_event: Raw<AnyRoomAccountDataEvent>
)
Update the StateChanges
struct with the given room with a new
AnyBasicEvent
.
Update the StateChanges
struct with the given room with a new
StrippedMemberEvent
.
pub fn add_state_event(
&mut self,
room_id: &RoomId,
event: AnySyncStateEvent,
raw_event: Raw<AnySyncStateEvent>
)
pub fn add_state_event(
&mut self,
room_id: &RoomId,
event: AnySyncStateEvent,
raw_event: Raw<AnySyncStateEvent>
)
Update the StateChanges
struct with the given room with a new
AnySyncStateEvent
.
Update the StateChanges
struct with the given room with a new
Notification
.
Update the StateChanges
struct with the given room with a new
Receipts
.
Trait Implementations
Returns the “default value” for a type. Read more