pub struct MonitorUpdate {
pub value: DecodedValue,
pub changed: Vec<u8>,
pub overrun: Vec<u8>,
pub consumed: usize,
pub paths: Vec<String>,
}Expand description
A decoded MONITOR update: the delta value plus both bitsets.
Fields§
§value: DecodedValue§changed: Vec<u8>Raw changed bitset. Bit 0 is the whole structure; field bits start at 1.
overrun: Vec<u8>Raw overrun bitset, same numbering. A set bit means the server dropped at least one update for that field before this one.
consumed: usizeBytes consumed from the body.
paths: Vec<String>Bit-indexed field paths for this update’s introspection: index 0 is
"<whole structure>", index n is the field addressed by bit n.
Captured at decode time so a callback can name the set bits without
also being handed the StructureDesc.
Implementations§
Source§impl MonitorUpdate
impl MonitorUpdate
Sourcepub fn has_overrun(&self) -> bool
pub fn has_overrun(&self) -> bool
True if any overrun bit is set.
Sourcepub fn overrun_fields(&self, desc: &StructureDesc) -> Vec<String>
pub fn overrun_fields(&self, desc: &StructureDesc) -> Vec<String>
Dotted paths of the fields whose overrun bits are set.
Bit 0 yields the literal "<whole structure>". Takes the descriptor
explicitly; MonitorUpdate::overrun_paths uses the paths the decoder
already captured.
Sourcepub fn changed_paths(&self) -> Vec<String>
pub fn changed_paths(&self) -> Vec<String>
Dotted paths of the fields marked changed in this update.
Bit 0 yields the literal "<whole structure>".
Sourcepub fn overrun_paths(&self) -> Vec<String>
pub fn overrun_paths(&self) -> Vec<String>
Dotted paths of the fields whose overrun bits are set — the server dropped at least one earlier update for each of them.
Trait Implementations§
Source§impl Clone for MonitorUpdate
impl Clone for MonitorUpdate
Source§fn clone(&self) -> MonitorUpdate
fn clone(&self) -> MonitorUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more