pub enum ChangeEvent {
Create {
path: Box<str>,
data: Value,
},
Update {
path: Box<str>,
data: Value,
old_data: Option<Value>,
},
Delete {
path: Box<str>,
old_data: Option<Value>,
},
Lock {
path: Box<str>,
data: Value,
},
Unlock {
path: Box<str>,
data: Value,
},
Ready {
path: Box<str>,
data: Option<Value>,
},
Replace {
path: Box<str>,
data: Option<Value>,
},
}Expand description
Real-time change event emitted when a document is created, updated, or deleted.
Variants§
Create
A new document was created
Fields
Update
An existing document was updated
Fields
Delete
A document was deleted
Fields
Lock
A lock was acquired on a document path
Unlock
A lock was released on a document path
Ready
Signals that all initial documents have been yielded for a subscription
Replace
A complete result set replacing everything the subscriber holds.
Distinct from ChangeEvent::Ready, which is the one-shot
initial-snapshot signal a client resolves its loading state on, and from
ChangeEvent::Update, which a client merges as a delta. A min/max
aggregate cannot express its recompute as either: the recompute yields the
whole group set, so a group that emptied is simply absent rather than
zeroed, and merging would keep it forever.
Implementations§
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more