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>
Sourcepub fn new() -> RelationalLinkedChunk<Item, Gap>
pub fn new() -> RelationalLinkedChunk<Item, Gap>
Create a new relational linked chunk.
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.
Trait Implementations§
Source§impl<Item, Gap> Debug for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Debug for RelationalLinkedChunk<Item, Gap>
Source§impl<Item, Gap> Default for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Default for RelationalLinkedChunk<Item, Gap>
Source§fn default() -> RelationalLinkedChunk<Item, Gap>
fn default() -> RelationalLinkedChunk<Item, Gap>
Auto Trait Implementations§
impl<Item, Gap> Freeze for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> RefUnwindSafe for RelationalLinkedChunk<Item, Gap>where
Item: RefUnwindSafe,
Gap: RefUnwindSafe,
impl<Item, Gap> Send for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Sync for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Unpin for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> UnwindSafe for RelationalLinkedChunk<Item, Gap>where
Item: UnwindSafe,
Gap: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more