pub async fn fetch_srcinfo(client: &Client, name: &str) -> Result<String>Expand description
What: Fetch .SRCINFO content for an AUR package using async HTTP.
Inputs:
client: Reqwest HTTP client.name: AUR package name.
Output:
- Returns .SRCINFO content as a string, or an error if fetch fails.
ยงErrors
- Returns
Errwhen HTTP request fails (network error or client error) - Returns
Errwhen HTTP response status is not successful - Returns
Errwhen response body cannot be read - Returns
Errwhen response is empty or contains HTML error page - Returns
Errwhen response does not appear to be valid .SRCINFO format
Details:
- Uses reqwest for async fetching with built-in timeout handling.
- Validates that the response is not empty, not HTML, and contains .SRCINFO format markers.
- Requires the
aurfeature to be enabled.