Skip to main content

fetch_pinned

Function fetch_pinned 

Source
pub async fn fetch_pinned(
    url: &str,
    sha256: &str,
    destination: &Path,
) -> Result<(), ManagedToolError>
Expand description

Download url, verify it against the pinned sha256, and write it to destination atomically.

ยงErrors

Returns ManagedToolError when the download fails, the checksum does not match the pinned value, or the file cannot be written.