pub struct IndexStatus {Show 18 fields
pub exists: bool,
pub path: Option<String>,
pub created_at: Option<String>,
pub age_seconds: Option<u64>,
pub symbol_count: Option<usize>,
pub file_count: Option<usize>,
pub languages: Option<Vec<String>>,
pub supports_fuzzy: bool,
pub supports_relations: bool,
pub cross_language_relation_count: Option<usize>,
pub symbol_counts_by_kind: Option<HashMap<String, usize>>,
pub file_counts_by_language: Option<HashMap<String, usize>>,
pub relation_counts_by_pair: Option<HashMap<String, usize>>,
pub stale: Option<bool>,
pub building: Option<bool>,
pub build_age_seconds: Option<u64>,
pub aggregate: Option<WorkspaceIndexStatus>,
pub partial: Option<bool>,
}Expand description
Index status information for programmatic consumers
Fields§
§exists: boolWhether an index exists
path: Option<String>Path to the index directory
created_at: Option<String>When the index was created (ISO 8601 format)
age_seconds: Option<u64>Age of the index in seconds
symbol_count: Option<usize>Total number of symbols indexed
file_count: Option<usize>Number of files indexed
languages: Option<Vec<String>>Languages found in the index
supports_fuzzy: boolWhether fuzzy search is supported
supports_relations: boolWhether relation queries are supported
cross_language_relation_count: Option<usize>Total count of cross-language relations
symbol_counts_by_kind: Option<HashMap<String, usize>>Node counts grouped by kind (e.g., {“function”: 25669, “class”: 332})
Used for tree view grouping in VSCode extension
file_counts_by_language: Option<HashMap<String, usize>>File counts grouped by language (e.g., {“rust”: 1245, “javascript”: 523})
Used for tree view grouping in VSCode extension
relation_counts_by_pair: Option<HashMap<String, usize>>Relation counts grouped by language pair (e.g., {“go→javascript”: 45})
Used for tree view grouping in VSCode extension
stale: Option<bool>Whether index is considered stale (>24 hours old)
building: Option<bool>Whether an index build is currently in progress (lock file exists)
build_age_seconds: Option<u64>Age of the lock file in seconds (if build is in progress)
aggregate: Option<WorkspaceIndexStatus>Aggregate WorkspaceIndexStatus for the workspace this path
belongs to.
Set only by Self::aggregate. The §1.4 contract for the
member-folder branch of sqry/indexStatus: when path
classifies as Member, the response carries the full
per-source-root status vector, the missing_count /
building_count / ok_count / error_count summary counters,
and the generated_at timestamp. Source / Excluded / Unknown
branches leave this field None so the wire shape stays
backwards-compatible.
partial: Option<bool>true when this status is a partial aggregate — at least one
source root is missing or error, so the workspace is not
fully indexed. Set only on the Self::aggregate path.
Distinct from Self::stale (which carries the >24h freshness
bit on per-source-root responses); the two flags coexist in the
wire shape so consumers can disambiguate “old snapshot” from
“incomplete workspace”.
Implementations§
Source§impl IndexStatus
impl IndexStatus
Sourcepub fn excluded() -> Self
pub fn excluded() -> Self
Create an index status indicating the path is explicitly excluded from
the logical workspace (per LogicalWorkspace::classify returning
Classification::Excluded).
Wire shape mirrors Self::not_found (no graph data) but the path
field carries the canonical excluded path so the client can disambiguate
“outside workspace” from “inside but excluded”. Callers must populate
path post-construction when context is available.
§Examples
use sqry_core::json_response::IndexStatus;
let status = IndexStatus::excluded();
assert!(!status.exists);Sourcepub fn aggregate(member_path: PathBuf, aggregate: WorkspaceIndexStatus) -> Self
pub fn aggregate(member_path: PathBuf, aggregate: WorkspaceIndexStatus) -> Self
Create an IndexStatus carrying the full aggregate
crate::workspace::WorkspaceIndexStatus for a workspace that
the requested path belongs to as a member folder (§1.4 of the
implementation plan, acceptance criterion 3).
Member folders never own a snapshot themselves; they route
through their workspace’s source roots. The response therefore
preserves the full per-source-root detail (source_root_statuses,
missing_count, building_count, ok_count, error_count,
generated_at) inside the Self::aggregate field, and
surfaces convenience summary projections through the existing
Self::exists, Self::building, and Self::age_seconds
scalars so simple consumers (e.g. --json formatters) can
render a one-line summary without re-walking the vector.
Self::existsistrueiff every source root reportsOk(no missing, no errors). This mirrors the §1.4 contract that a member folder “is indexed” only when the workspace as a whole is.Self::pathis set to the canonical member-folder path the caller supplied; consumers can disambiguate fromSelf::not_found(which omitspath).Self::buildingis set when any source root has a build-lock present.Self::partialis set when any source root isMissingorError, signalling that the aggregate is incomplete.Self::age_secondsis computed againstaggregate.generated_atwhen at least one source root reportsOk.
§Examples
use std::path::PathBuf;
use sqry_core::json_response::IndexStatus;
use sqry_core::workspace::WorkspaceIndexStatus;
let aggregate = WorkspaceIndexStatus::from_source_root_statuses(Vec::new());
let status = IndexStatus::aggregate(PathBuf::from("/tmp/member"), aggregate);
assert_eq!(status.path.as_deref(), Some("/tmp/member"));Sourcepub fn from_index(
path: String,
created_at: String,
age_seconds: u64,
) -> IndexStatusBuilder
pub fn from_index( path: String, created_at: String, age_seconds: u64, ) -> IndexStatusBuilder
Create index status from metadata (builder pattern to avoid too many args)
Trait Implementations§
Source§impl Clone for IndexStatus
impl Clone for IndexStatus
Source§fn clone(&self) -> IndexStatus
fn clone(&self) -> IndexStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexStatus
impl Debug for IndexStatus
Auto Trait Implementations§
impl Freeze for IndexStatus
impl RefUnwindSafe for IndexStatus
impl Send for IndexStatus
impl Sync for IndexStatus
impl Unpin for IndexStatus
impl UnsafeUnpin for IndexStatus
impl UnwindSafe for IndexStatus
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,
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more