pub enum LiveQueryEvent {
    Initial,
    Update {
        old_documents: Vec<BoxedDocument>,
        insertions: Box<[usize]>,
        deletions: Box<[usize]>,
        updates: Box<[usize]>,
        moves: Vec<LiveQueryMove>,
    },
}
Expand description

Describes the different types of event that you can receive when dealing with live queries.

Variants

Initial

The first event that will be delivered and it will only be delivered once.

Update

Fields

old_documents: Vec<BoxedDocument>
insertions: Box<[usize]>
deletions: Box<[usize]>
updates: Box<[usize]>

This event will be delivered each time the results of the provided query change. It contains information about the set of documents that previously matched the query before the update, along with information about what documents have been inserted, deleted, updated, or moved, as part of the set of matching documents.

Implementations

Return an hash of a document

Return the hash the Documents mnemonic.

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.