pub enum LiveQueryEvent {
Initial,
Update {
old_documents: Vec<BoxedDocument>,
insertions: Box<[usize]>,
deletions: Box<[usize]>,
updates: Box<[usize]>,
moves: Vec<LiveQueryMove>,
},
}👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadExpand description
Use pending_op.observe_local(...) to receive LiveQueryEvents describing document
changes.
Describes the different types of event that you can receive when dealing with live queries.
Variants§
Initial
👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadThe first event that will be delivered and it will only be delivered once.
Update
👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadThis 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.
Fields
§
old_documents: Vec<BoxedDocument>👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead§
insertions: Box<[usize]>👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead§
deletions: Box<[usize]>👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead§
updates: Box<[usize]>👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead§
moves: Vec<LiveQueryMove>👎Deprecated: Use
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadImplementations§
Source§impl LiveQueryEvent
impl LiveQueryEvent
Sourcepub fn hash(&self, docs: &[BoxedDocument]) -> Result<u64, DittoError>
👎Deprecated: Use ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead
pub fn hash(&self, docs: &[BoxedDocument]) -> Result<u64, DittoError>
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadReturn an hash of a document
Sourcepub fn hash_mnemonic(
&self,
docs: &[BoxedDocument],
) -> Result<String, DittoError>
👎Deprecated: Use ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) instead
pub fn hash_mnemonic( &self, docs: &[BoxedDocument], ) -> Result<String, DittoError>
ditto.store().execute_v2(...) or ditto.store().register_observer_v2(...) insteadReturn the hash the Documents mnemonic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveQueryEvent
impl RefUnwindSafe for LiveQueryEvent
impl Send for LiveQueryEvent
impl Sync for LiveQueryEvent
impl Unpin for LiveQueryEvent
impl UnwindSafe for LiveQueryEvent
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
Mutably borrows from an owned value. Read more