fetch_srcinfo

Function fetch_srcinfo 

Source
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 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
  • Returns Err when 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 aur feature to be enabled.