fetch_srcinfo_async

Function fetch_srcinfo_async 

Source
pub async fn fetch_srcinfo_async(
    client: &Client,
    name: &str,
) -> Result<String, 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 Err when HTTP request fails (network error or client error)
  • Returns Err when HTTP response status is not successful
  • Returns Err when response body cannot be read
  • Returns Err when response is empty or contains HTML error page

Details:

  • Uses reqwest for async fetching with built-in timeout handling.
  • Validates that the response is not empty and not HTML.