Struct dittolive_ditto::store::collections::event::CollectionsEvent
source · [−]pub struct CollectionsEvent {
pub is_initial: bool,
pub collections: Vec<Collection>,
pub old_collections: Vec<Collection>,
pub insertions: Box<[usize]>,
pub deletions: Box<[usize]>,
pub updates: Box<[usize]>,
pub moves: Vec<LiveQueryMove>,
}
Expand description
Provides information about the changes that have occurred in relation to an event delivered when
observing the collections in a DittoStore
. It contains information about the collections that
are known about as well as the collections that were previously known about in the previous
event, along with information about what collections have been inserted, deleted, updated, or
moved since the last event.
Fields
is_initial: bool
collections: Vec<Collection>
old_collections: Vec<Collection>
insertions: Box<[usize]>
deletions: Box<[usize]>
updates: Box<[usize]>
moves: Vec<LiveQueryMove>
Implementations
sourceimpl CollectionsEvent
impl CollectionsEvent
sourcepub fn initial(collections: Vec<Collection>) -> Self
pub fn initial(collections: Vec<Collection>) -> Self
Create a new CollectionsEvent in initial state.
sourcepub fn update(
collections: Vec<Collection>,
old_collections: Vec<Collection>,
insertions: Box<[usize]>,
deletions: Box<[usize]>,
updates: Box<[usize]>,
moves: Vec<LiveQueryMove>
) -> Self
pub fn update(
collections: Vec<Collection>,
old_collections: Vec<Collection>,
insertions: Box<[usize]>,
deletions: Box<[usize]>,
updates: Box<[usize]>,
moves: Vec<LiveQueryMove>
) -> Self
Update a CollectionsEvent with provided data.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CollectionsEvent
impl Send for CollectionsEvent
impl Sync for CollectionsEvent
impl Unpin for CollectionsEvent
impl UnwindSafe for CollectionsEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CompatExt for T
impl<T> CompatExt for T
fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Applies the [
Compat
] adapter by shared reference. Read morefn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Applies the [
Compat
] adapter by mutable reference. Read more