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: boolcollections: Vec<Collection>old_collections: Vec<Collection>insertions: Box<[usize]>deletions: Box<[usize]>updates: Box<[usize]>moves: Vec<LiveQueryMove>

Implementations

Create a new CollectionsEvent in initial state.

Update a CollectionsEvent with provided data.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.
Tries to convert to T by calling TryInto<T>::try_into.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.