Skip to main content

InstanceState

Struct InstanceState 

Source
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

Pro-Instanz-Buchhaltung.

Fields§

§handle: InstanceHandle

Lokaler Handle (stabil ueber den Tracker-Lebenszyklus).

§kind: InstanceStateKind

Aktueller Lifecycle-Zustand.

§disposed_generation_count: i32

NOT_ALIVE_DISPOSED → ALIVE-Transitions seit erstem Sample.

§no_writers_generation_count: i32

NOT_ALIVE_NO_WRITERS → ALIVE-Transitions seit erstem Sample.

§writer_count: u32

Anzahl Writer, die diese Instanz aktuell als registriert fuehren. Reader-seitig: jeder eingehende Sample erhoeht den Counter (falls neuer Writer); jeder unregister-Marker dekrementiert. Writer-seitig: 0 oder 1 (eine Writer-Sicht).

§last_sample_timestamp: Option<Time>

Wall-Clock-Zeit des zuletzt verarbeiteten Samples (oder None).

§last_delivered_ts: Option<Time>

Reader-side: source_timestamp des letzten ans User-API gelieferten Samples dieser Instanz. Spec §2.2.3.12 TIME_BASED_FILTER: ein neues Sample wird gefiltert wenn t - last_delivered_ts < minimum_separation.

§disposed_at: Option<Time>

Reader-side: Wall-Clock-Zeit, zu der die Instanz in NOT_ALIVE_DISPOSED uebergegangen ist. Spec §2.2.3.22 autopurge_disposed_samples_delay: Samples werden nach Ablauf des Delays purged.

§no_writers_at: Option<Time>

Reader-side: Wall-Clock-Zeit, zu der die Instanz in NOT_ALIVE_NO_WRITERS uebergegangen ist. 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): aktueller Eigentuemer-Writer als (GuidLike, Strength). Bei Tie-Breaker gewinnt der lexikographisch hoehere GuidLike. Bei Liveliness- Loss: explizit per clear_owner reset.

§key_holder: Vec<u8>

Gespeicherter Key-Holder (Bytes), so kann get_key_value ohne erneutes Decoden den Key zurueckspielen. Das ist der PLAIN_CDR2- BE-Stream, also exakt der Input von compute_key_hash.

§reader_view_new: bool

View-State auf Reader-Seite. Auf Writer-Seite unbenutzt.

§samples_in_cache: u32

Anzahl bisheriger Reader-Samples in dieser Instanz (sample_rank- Hilfswert fuer den naechsten Read).

Trait Implementations§

Source§

impl Clone for InstanceState

Source§

fn clone(&self) -> InstanceState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstanceState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.