resolve_catalog_package

Function resolve_catalog_package 

Source
fn resolve_catalog_package<FChoose>(
    conn: &DbConnection,
    query: &str,
    choose_package: FChoose,
) -> Result<CatalogPackage>
where FChoose: FnMut(&str, &[CatalogPackage]) -> Result<usize>,
Expand description

Resolve a query into a single catalog package.

The function first runs a catalog search and then applies the disambiguation rules described at the module level. Exact name matches are preferred over interactive selection, and the provided chooser is only consulted when the query still maps to multiple candidates.