Expand description
The event cache is an abstraction layer, sitting between the Rust SDK and a final client, that acts as a global observer of all the rooms, gathering and inferring some extra useful information about each room. In particular, this doesn’t require subscribing to a specific room to get access to this information.
It’s intended to be fast, robust and easy to maintain, having learned from previous endeavours at implementing middle to high level features elsewhere in the SDK, notably in the UI’s Timeline object.
See the github issue for more details about the historical reasons that led us to start writing this.
Modules§
- paginator
- The paginator is a stateful helper object that handles reaching an event, either from a cache or network, and surrounding events (“context”). Then, it makes it possible to paginate forward or backward, from that event, until one end of the timeline (front or back) is reached.
Structs§
- Back
Pagination Outcome - The result of a single back-pagination request.
- Event
Cache - An event cache, providing lots of useful functionality for clients.
- Event
Cache Drop Handles - Hold handles to the tasks spawn by a
RoomEventCache
. - Room
Event Cache - A subset of an event cache, for a room.
- Room
Event Cache Listener - Thin wrapper for a room event cache listener, so as to trigger side-effects when all listeners are gone.
- Room
Pagination - An API object to run pagination queries on a
super::RoomEventCache
.
Enums§
- Event
Cache Error - An error observed in the
EventCache
. - Events
Origin - Indicate where events are coming from.
- Pagination
Token - Pagination token data, indicating in which state is the current pagination.
- Room
Event Cache Update - An update related to events happened in a room.
- Room
Pagination Status - Status for the back-pagination on a room event cache.
Type Aliases§
- Result
- A result using the
EventCacheError
.