pub struct DirtySet<const N: usize> { /* private fields */ }Expand description
One attribute path that has changed since the last report.
A fixed-capacity set, because a subscription’s report must be bounded and a device cannot allocate. When it fills, the subscription stops tracking individual paths and re-primes on the next report — §8.5’s own recovery: “Including all subscription data to re-prime the subscription”.
Implementations§
Source§impl<const N: usize> DirtySet<N>
impl<const N: usize> DirtySet<N>
Sourcepub fn insert(&mut self, path: AttributePath)
pub fn insert(&mut self, path: AttributePath)
Records a change to a concrete path.
Duplicates are dropped: a value that changed twice between reports is reported once, with its latest value — §8.5 asks for “the attribute data that has changed”, not a history of it.
Sourcepub fn paths(&self) -> &[AttributePath]
pub fn paths(&self) -> &[AttributePath]
The changed paths, or empty when the set has overflowed.
Sourcepub const fn must_reprime(&self) -> bool
pub const fn must_reprime(&self) -> bool
Whether the next report must carry the whole subscription.
Sourcepub fn reprime(&mut self)
pub fn reprime(&mut self)
Marks the subscription for a full re-prime.
§8.5: “If the publisher does not receive a Status Response action in response to a Report Data action … the publisher MAY terminate the Subscribe interaction or SHALL re-synchronize the subscription in the next Report Data transaction by … Including all subscription data to re-prime the subscription.”