pub struct RecordUpdate {
pub topic: Option<String>,
pub value: Option<Value>,
pub skipped: u64,
pub snapshot_end: bool,
}Expand description
One update from a subscription: the record value, plus the delivery metadata the engine tracks alongside it.
One inbound frame yields exactly one of these, so skipped
and snapshot_end always describe the frame they
arrive on.
Fields§
§topic: Option<String>Concrete record that fired. Some on wildcard subscriptions, which fan
in many records under one subscription; None when the server left the
event untagged (exact-topic subscribe).
value: Option<Value>The decoded record value, or None if the payload did not decode — a
malformed peer, since the server serializes record values as JSON.
An undecodable frame is still delivered, so that
skipped and snapshot_end stay
attached to the frame they describe, and so one bad record cannot end a
wildcard stream that fans in many.
skipped: u64Updates lost between the previous delivered update and this one — 0
when delivery was lossless. Non-zero means the server-side buffer
overran a slow consumer, so the value stream has a hole immediately
before this item.
snapshot_end: boolFinal update of a late-join snapshot burst: every update after it is a
live event. A burst that overran the sink carries its whole loss in
skipped here — the engine reserves a slot for this
update, so an overrun cannot cost you the marker.
Its absence is not a signal, and must never be waited on. The marker
rides the last snapshot’s frame, so a burst that produced none never
sets it: nothing matched, nothing has a value yet, an exact-topic
subscribe, or a tail that failed to encode. Only the last of those is a
real loss, and skipped reports it.
Implementations§
Trait Implementations§
Source§impl Clone for RecordUpdate
impl Clone for RecordUpdate
Source§fn clone(&self) -> RecordUpdate
fn clone(&self) -> RecordUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more