pub struct InstanceState {Show 13 fields
pub handle: InstanceHandle,
pub kind: InstanceStateKind,
pub disposed_generation_count: i32,
pub no_writers_generation_count: i32,
pub writer_count: u32,
pub last_sample_timestamp: Option<Time>,
pub last_delivered_ts: Option<Time>,
pub disposed_at: Option<Time>,
pub no_writers_at: Option<Time>,
pub current_owner: Option<([u8; 16], i32)>,
pub key_holder: Vec<u8>,
pub reader_view_new: bool,
pub samples_in_cache: u32,
}Expand description
Per-instance bookkeeping.
Fields§
§handle: InstanceHandleLocal handle (stable across the tracker lifecycle).
kind: InstanceStateKindCurrent lifecycle state.
disposed_generation_count: i32NOT_ALIVE_DISPOSED → ALIVE transitions since the first sample.
no_writers_generation_count: i32NOT_ALIVE_NO_WRITERS → ALIVE transitions since the first sample.
writer_count: u32Number of writers that currently consider this instance registered. Reader side: each incoming sample increments the counter (if it is a new writer); each unregister marker decrements it. Writer side: 0 or 1 (a single writer’s view).
last_sample_timestamp: Option<Time>Wall-clock time of the last processed sample (or None).
last_delivered_ts: Option<Time>Reader side: source_timestamp of this instance’s last sample
delivered to the user API. Spec §2.2.3.12 TIME_BASED_FILTER: a
new sample is filtered out when
t - last_delivered_ts < minimum_separation.
disposed_at: Option<Time>Reader side: wall-clock time at which the instance transitioned
into NOT_ALIVE_DISPOSED. Spec §2.2.3.22
autopurge_disposed_samples_delay: samples are purged after the
delay elapses.
no_writers_at: Option<Time>Reader side: wall-clock time at which the instance transitioned
into NOT_ALIVE_NO_WRITERS. Spec §2.2.3.22
autopurge_no_writer_samples_delay.
current_owner: Option<([u8; 16], i32)>Reader side OWNERSHIP=EXCLUSIVE (Spec §2.2.3.10): current owner
writer as (GuidLike, Strength). On a tie, the lexicographically
higher GuidLike wins. On liveliness loss: reset explicitly via
clear_owner.
key_holder: Vec<u8>Stored key holder (bytes), so get_key_value can replay the key
without re-decoding. This is the PLAIN_CDR2-BE stream, i.e.
exactly the input to compute_key_hash.
reader_view_new: boolView state on the reader side. Unused on the writer side.
samples_in_cache: u32Number of reader samples so far in this instance (a sample_rank helper value for the next read).
Trait Implementations§
Source§impl Clone for InstanceState
impl Clone for InstanceState
Source§fn clone(&self) -> InstanceState
fn clone(&self) -> InstanceState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more