pub struct SearchInCrateData {
pub crate_name: String,
pub query: String,
pub version: String,
pub item_type: Option<String>,
pub match_mode: String,
pub total: usize,
pub emitted: usize,
pub hits: Vec<SearchInCrateHit>,
pub truncated: bool,
pub source_url: String,
pub cache_hit: bool,
}Expand description
search-in-crate result set (truncated is true when hits were cut by --limit
and/or by --max-output-bytes output budget).
Fields§
§crate_name: StringRequested crate name.
query: StringText filter applied to hits.
version: StringRequested version token.
item_type: Option<String>Echo of the applied item-type filter when set.
match_mode: StringMatch mode applied (exact | prefix | substring).
total: usizeHits the upstream index classified, before --limit.
Describes docs.rs, not this envelope, so agent-native reduction leaves it alone: it is the only count that survives a filter intact.
emitted: usizeLength of the emitted hits array.
Listed in crate::agent_ops::EMITTED_COUNT_KEYS, so reduction rewrites it
whenever it shrinks the array. A field that names the array has to follow it.
hits: Vec<SearchInCrateHit>Emitted hits.
truncated: boolTrue when the hit list was cut by --limit (total > emitted).
source_url: StringFinal source URL of the all.html page.
cache_hit: boolTrue when the HTTP body was served from the local disk cache.