pub struct RelationalLinkedChunk<Item, Gap> { /* private fields */ }
Expand description
A LinkedChunk
but with a relational layout, similar to what we
would have in a database.
This is used by memory stores. The idea is to have a data layout that is
similar for memory stores and for relational database stores, to represent a
LinkedChunk
.
This type is also designed to receive Update
. Applying Update
s
directly on a LinkedChunk
is not ideal and particularly not trivial as
the Update
s do not match the internal data layout of the LinkedChunk
,
they have been designed for storages, like a relational database for
example.
This type is not as performant as LinkedChunk
(in terms of memory
layout, CPU caches etc.). It is only designed to be used in memory stores,
which are mostly used for test purposes or light usage of the SDK.
Implementations§
Source§impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
Source§impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
Sourcepub fn reload_chunks<const CAP: usize>(
&self,
room_id: &RoomId,
builder: &mut LinkedChunkBuilder<CAP, Item, Gap>,
) -> Result<(), String>
pub fn reload_chunks<const CAP: usize>( &self, room_id: &RoomId, builder: &mut LinkedChunkBuilder<CAP, Item, Gap>, ) -> Result<(), String>
Reloads the chunks.
Return an error result if the data was malformed in the struct, with a string message explaining details about the error.