pub struct Notification {
pub query_id: String,
pub action: Action,
pub record_id: Value,
pub data: Value,
}Expand description
One live-query change frame: which query, what happened, and the record.
data is the raw CBOR record exactly as SurrealDB delivered it (a map of
fields including id). Consumers decode it with the same CBOR→value path
they use for ordinary reads. record_id is the affected row’s id (a
SurrealDB Thing), present on every action — including Delete, where
data may be empty.
Fields§
§query_id: StringThe live-query id this frame belongs to (matches LiveStream::query_id).
action: ActionThe kind of change.
record_id: ValueThe affected row’s id, as raw CBOR (a Thing).
data: ValueThe affected record as raw CBOR (empty/Null on some Deletes).
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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