File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
crates/matrix-sdk-indexeddb/src/event_cache_store Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#![ allow( unused) ]
16
16
17
+ use indexed_db_futures:: IdbDatabase ;
18
+ use matrix_sdk_base:: event_cache:: store:: MemoryStore ;
19
+ use web_sys:: IdbTransactionMode ;
20
+
21
+ use crate :: event_cache_store:: serializer:: IndexeddbEventCacheStoreSerializer ;
22
+
17
23
mod error;
18
24
mod migrations;
19
25
mod serializer;
20
26
mod transaction;
21
27
mod types;
28
+
29
+ /// A type for providing an IndexedDB implementation of [`EventCacheStore`][1].
30
+ /// This is meant to be used as a backend to [`EventCacheStore`][1] in browser
31
+ /// contexts.
32
+ ///
33
+ /// [1]: matrix_sdk_base::event_cache::store::EventCacheStore
34
+ pub struct IndexeddbEventCacheStore {
35
+ // A handle to the IndexedDB database
36
+ inner : IdbDatabase ,
37
+ // A serializer with functionality tailored to `IndexeddbEventCacheStore`
38
+ serializer : IndexeddbEventCacheStoreSerializer ,
39
+ // An in-memory store for providing temporary implementations for
40
+ // functions of `EventCacheStore`.
41
+ //
42
+ // NOTE: This will be removed once we have IndexedDB-backed implementations for all
43
+ // functions in `EventCacheStore`.
44
+ memory_store : MemoryStore ,
45
+ }
You can’t perform that action at this time.
0 commit comments