pub struct IndexReadinessSnapshot {
pub state: String,
pub index_id: Option<String>,
pub lifecycle_status: Option<String>,
pub chunk_count: Option<u64>,
pub lexical_ready: bool,
pub semantic_ready: bool,
pub graph_ready: bool,
pub summary: String,
}Expand description
A cached snapshot of the Event::IndexReadiness payload (DOC-39 §5.6
Slice D — session.get_readiness query RPC).
Why: Event::IndexReadiness above is emitted exactly once, at task start
— a fire-once event, not a queryable value. A UI client that attaches to
a session AFTER that one-time probe fired has no way to ask “what is the
readiness state right now”; it can only ever see events that arrive while
it happens to be subscribed. This struct is the field-for-field twin of
Event::IndexReadiness’s payload (deliberately excluding session_id,
which is contextual to the cache slot it lives in, not the event) so
SessionRegistry can cache the last-recorded probe per session and
session.get_readiness can hand it back verbatim to a late-attaching
client — one shape for both the streamed event and the query response,
with no independent field-naming to drift out of sync.
What: every field name and type matches the corresponding field on
Event::IndexReadiness exactly. SessionRegistry::record_index_readiness
builds one of these first and derives the Event::IndexReadiness it
publishes from it, so the two can never disagree.
Test: session::registry_tests::record_index_readiness_caches_snapshot_for_late_query,
session::protocol_readiness::tests::get_readiness_returns_probed_snapshot_after_recording.
Fields§
§state: String"ready" | "warming" | "unavailable" — see Event::IndexReadiness.
index_id: Option<String>§lifecycle_status: Option<String>§chunk_count: Option<u64>§lexical_ready: bool§semantic_ready: bool§graph_ready: bool§summary: StringTrait Implementations§
Source§impl Clone for IndexReadinessSnapshot
impl Clone for IndexReadinessSnapshot
Source§fn clone(&self) -> IndexReadinessSnapshot
fn clone(&self) -> IndexReadinessSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexReadinessSnapshot
impl Debug for IndexReadinessSnapshot
Source§impl<'de> Deserialize<'de> for IndexReadinessSnapshot
impl<'de> Deserialize<'de> for IndexReadinessSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for IndexReadinessSnapshot
impl PartialEq for IndexReadinessSnapshot
Source§impl Serialize for IndexReadinessSnapshot
impl Serialize for IndexReadinessSnapshot
impl StructuralPartialEq for IndexReadinessSnapshot
Auto Trait Implementations§
impl Freeze for IndexReadinessSnapshot
impl RefUnwindSafe for IndexReadinessSnapshot
impl Send for IndexReadinessSnapshot
impl Sync for IndexReadinessSnapshot
impl Unpin for IndexReadinessSnapshot
impl UnsafeUnpin for IndexReadinessSnapshot
impl UnwindSafe for IndexReadinessSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more