Struct RelationalLinkedChunk
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§
§impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
pub fn new() -> RelationalLinkedChunk<Item, Gap>
pub fn new() -> RelationalLinkedChunk<Item, Gap>
Create a new relational linked chunk.
pub fn clear(&mut self)
pub fn clear(&mut self)
Removes all the chunks and items from this relational linked chunk.
pub fn apply_updates(
&mut self,
room_id: &RoomId,
updates: Vec<Update<Item, Gap>>,
)
pub fn apply_updates( &mut self, room_id: &RoomId, updates: Vec<Update<Item, Gap>>, )
Apply Update
s. That’s the only way to write data inside this
relational linked chunk.
§impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> RelationalLinkedChunk<Item, Gap>
Trait Implementations§
§impl<Item, Gap> Debug for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Debug for RelationalLinkedChunk<Item, Gap>
§impl<Item, Gap> Default for RelationalLinkedChunk<Item, Gap>
impl<Item, Gap> Default for RelationalLinkedChunk<Item, Gap>
§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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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