Function download_binary

Source
pub fn download_binary<S, P>(url: S, destination: P) -> Result<PathBuf, String>
where S: Into<String> + Clone + Copy, P: Into<PathBuf> + Clone,
Expand description

Downloads a binary file from the given URL to the destination path.

§Arguments

  • url - A string slice representing the URL of the binary to download.
  • destination - A path to the root directory where the file should be saved.

§Returns

A Result containing a PathBuf to the downloaded file on success, or a string error message on failure.