pub fn parse_all_html_hits(
html: &str,
base: &Url,
query: &SearchQuery,
item_type: Option<ItemKind>,
limit: usize,
match_mode: MatchMode,
cancel: &CancelFlag,
) -> AppResult<Vec<SearchInCrateHit>>Expand description
Pure parse of all.html body for offline tests and CPU workers.
base must be the final all.html URL (or its directory). Relative and
absolute-path hrefs resolve via resolve_hit_url against this URL — never
against a hardcoded docs.rs host — so stdlib (doc.rust-lang.org) and
mock origins keep correct hit URLs (SCRAPE-Q-001). Off-origin absolute hrefs
are soft-skipped (SCRAPE-S-001).
The scan is sequential at every size (see module docs).
Results are scored and sorted (exact leaf first) before applying limit.
§Errors
Currently infallible for join failures (soft-skip); reserved for future hard parse failures of the document itself.