pub async fn fetch_arch_package_detail(
client: &Client,
package: &OfficialPackage,
limits: MetadataFetchLimits,
) -> Result<Option<OfficialPackage>>Expand description
What: Fetch one official Arch package detail with caller-owned transport policy.
Inputs:
client: Caller-provided reqwest client controlling timeout, proxy, TLS, redirect, and user-agent behavior.package: Existing public index model selecting a package name and, optionally, repository and architecture.limits: Explicit response and candidate bounds for this request.
Output:
- An enriched
OfficialPackagewhen the endpoint has an exact matching row, orNonewhen no exact package row is present.
Details:
- Uses
ARCH_PACKAGE_SEARCH_URL, which is already the repository’s official-index fallback endpoint. For deterministic tests, derivative distributions, or another trusted endpoint, usefetch_official_package_detail_from. - It performs one bounded HTTP request and never invokes
pacmanor a shell.
§Errors
Returns an error for invalid selector/limits, transport/status/read failures, oversized responses, or malformed JSON response roots.