Function download_github

Source
pub async fn download_github<T: AsRef<Path>, K>(
    repo: &str,
    is_valid_file: K,
    path: T,
    hash_url: Option<String>,
) -> Result<impl Stream<Item = Result<(f32, String), DownloadError>>>
where K: Fn(&str) -> bool,
Expand description

Downloads the latest GitHub release asset matching a predicate, with optional hash verification.

§Arguments

  • repo - GitHub repo in owner/name format.
  • is_valid_file - Predicate to select the asset.
  • path - Destination file path.
  • hash_url - Optional URL to a hash file.

§Returns

A stream yielding progress and status, or errors.