pub struct SubUpdate {
pub topic: Option<Arc<str>>,
pub data: Payload,
pub skipped: u64,
pub snapshot_end: bool,
}Expand description
One update delivered on a subscription stream (server Session::subscribe
and client ClientHandle::subscribe alike).
topic names the concrete record that fired: Some on wildcard
subscriptions, which fan in many records under one subscription id, and on
any transport that tags every event; None on an exact-topic subscription.
Fields§
§topic: Option<Arc<str>>Concrete record topic that fired, when the producer side tags it.
data: PayloadThe serialized record value.
skipped: u64Count of skipped records
snapshot_end: boolSet on the last update of the late-join snapshot burst, carrying its total skipped.
Only set when the burst produced a final update to carry it — an empty burst, an exact-topic subscribe, or a tail that failed to encode end without one — so its absence says nothing.
Implementations§
Source§impl SubUpdate
impl SubUpdate
Sourcepub fn tagged(topic: Arc<str>, data: Payload) -> Self
pub fn tagged(topic: Arc<str>, data: Payload) -> Self
A topic-tagged update (wildcard / bus subscription).
Sourcepub fn with_skipped(self, n: u64) -> Self
pub fn with_skipped(self, n: u64) -> Self
Mark that n updates were lost on this subscription immediately before
this one (0 leaves the update lossless).
Sourcepub fn with_snapshot_end(self) -> Self
pub fn with_snapshot_end(self) -> Self
Mark this update as the last of the late-join snapshot burst (see
snapshot_end).