#[non_exhaustive]pub enum SubscriptionEvent {
Report(AttributeReport),
Event(EventReport),
Established {
subscription_id: u32,
},
Resubscribing {
cause: Error,
},
Lagged {
dropped: usize,
},
}Expand description
An event from a live Subscription.
This enum is #[non_exhaustive]: matching on it must include a wildcard arm,
because future protocol work may add variants without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Report(AttributeReport)
A reported attribute value (a priming value or a steady-state change).
Event(EventReport)
A reported event (a priming/historical event or a steady-state emission).
Delivered on the same bounded report channel as Self::Report; under
backpressure it is dropped and surfaced via Self::Lagged like any
report. Events have no list-merge semantics, so they are delivered as they
arrive (they bypass the chunked-attribute reassembler).
Established
The subscription was (re-)established by the device; carries the
device-assigned subscription id. Fired after each successful
SubscribeResponse, including after an auto-resubscribe (SH.2b). Priming
Self::Reports, if any, precede it (they arrive before the
SubscribeResponse on the wire).
Delivered reliably even under report backpressure (see Subscription).
Resubscribing
The subscription went stale (liveness timeout or session loss) and is
being transparently re-established; cause is why. Reports resume after
the next Self::Established. Emitted by the SH.2b resubscribe engine.
Delivered reliably even under report backpressure (see Subscription).
Lagged
One or more Self::Reports were dropped because the consumer did not
drain Subscription::next fast enough to keep up with the device’s
reporting cadence, and the bounded report buffer filled. dropped is the
number of reports discarded since the previous Lagged (a coalesced
count, not one event per drop). Subsequent reports continue to arrive;
only the buffer-overflow ones were lost. A re-read or the next
Self::Established re-prime can be used to recover authoritative state.