We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cfba4c commit 2689e2dCopy full SHA for 2689e2d
crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/traits.rs
@@ -63,3 +63,14 @@ pub trait IndexedKey<T: Indexed> {
63
serializer: &IndexeddbSerializer,
64
) -> Self;
65
}
66
+
67
+/// A trait for constructing the bounds of an [`IndexedKey`].
68
+///
69
+/// This is useful when constructing range queries in IndexedDB.
70
+pub trait IndexedKeyBounds<T: Indexed>: IndexedKey<T> {
71
+ /// Encodes the lower bound of the key.
72
+ fn encode_lower(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self;
73
74
+ /// Encodes the upper bound of the key.
75
+ fn encode_upper(room_id: &RoomId, serializer: &IndexeddbSerializer) -> Self;
76
+}
0 commit comments