pub struct Hit {Show 14 fields
pub name: String,
pub kind: String,
pub language: String,
pub file: String,
pub line: i64,
pub end_line: Option<i64>,
pub parent: Option<String>,
pub visibility: Option<String>,
pub repo_identity: String,
pub score: f64,
pub confidence: f64,
pub features: Vec<Feature>,
pub signature: Option<String>,
pub body: Option<String>,
}Expand description
A ranked search result. Serializes for --json / --ndjson.
Fields§
§name: String§kind: String§language: String§file: String§line: i64§end_line: Option<i64>1-based last line of the definition — read line..=end_line for the whole
span. Omitted in JSON when unknown (a row indexed before end-line tracking).
parent: Option<String>§visibility: Option<String>Access level (public/crate/private/protected) when the language
expresses one. Omitted when unknown.
repo_identity: String§score: f64Raw additive score — the ranking key and the --explain breakdown source.
Not serialized: JSON exposes the normalized confidence instead.
confidence: f64Normalized match confidence in [0,1], filled before output (see
score::confidence). This is what JSON carries in place of the raw score.
features: Vec<Feature>The scoring features, serialized as their names in descending weight order
(the raw values are low-signal unnormalized; --explain shows them in text).
signature: Option<String>The definition’s source line (trimmed) — filled for displayed results in
machine-readable output. Omitted when unread (matching --symbols).
body: Option<String>The full definition source (line..=end_line), filled only by --show.