pub async fn fetch_first_match_for_query(q: String) -> Option<PackageItem>Expand description
What: Resolve a free-form query string to a best-effort matching package.
Inputs:
q: Query string to resolve
Output:
Some(PackageItem)per the priority rules below;Noneif nothing usable is found.
Details (selection priority):
- Exact-name match from the official index;
- Exact-name match from AUR;
- First official result;
- Otherwise, first AUR result.
Performs network I/O for AUR; tolerates errors.