pub enum IndexState {
Idle {
since: Instant,
},
Initializing {
progress: u8,
started_at: Instant,
},
Building {
phase: BuildPhase,
indexed_count: usize,
total_count: usize,
started_at: Instant,
},
Updating {
updating_count: usize,
started_at: Instant,
},
Invalidating {
reason: InvalidationReason,
started_at: Instant,
},
Ready {
symbol_count: usize,
file_count: usize,
completed_at: Instant,
},
Degraded {
reason: DegradationReason,
available_symbols: usize,
since: Instant,
},
Error {
message: String,
since: Instant,
},
}Expand description
Workspace indexing and refactoring orchestration. Enhanced index state with additional production-ready states.
Extends the original IndexState with Initializing, Updating, Invalidating, and Error states for comprehensive lifecycle management.
Variants§
Idle
Index is idle and not initialized
Initializing
Index is being initialized
Building
Index is being built (workspace scan in progress)
Fields
§
phase: BuildPhaseCurrent build phase
Updating
Index is being updated (incremental changes)
Invalidating
Index is being invalidated
Fields
§
reason: InvalidationReasonReason for invalidation
Ready
Index is ready for queries
Fields
Degraded
Index is degraded but partially functional
Fields
§
reason: DegradationReasonWhy we degraded
Error
Index is in error state
Implementations§
Source§impl IndexState
impl IndexState
Sourcepub fn kind(&self) -> IndexStateKind
pub fn kind(&self) -> IndexStateKind
Return the coarse state kind for instrumentation and routing decisions.
Sourcepub fn is_transitional(&self) -> bool
pub fn is_transitional(&self) -> bool
Check if the index is in a transitional state.
Sourcepub fn state_started_at(&self) -> Instant
pub fn state_started_at(&self) -> Instant
Get the timestamp of when the current state began.
Trait Implementations§
Source§impl Clone for IndexState
impl Clone for IndexState
Source§fn clone(&self) -> IndexState
fn clone(&self) -> IndexState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IndexState
impl RefUnwindSafe for IndexState
impl Send for IndexState
impl Sync for IndexState
impl Unpin for IndexState
impl UnsafeUnpin for IndexState
impl UnwindSafe for IndexState
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
Mutably borrows from an owned value. Read more