fn download_to_cache(
api: &Api,
package: &PackageInfo,
cache: &mut Cache,
progress: &'_ mut dyn FnMut(u64, Option<u64>),
cancel: &AtomicBool,
) -> Result<(), Failure>Expand description
Streams package to a temp file while hashing it, then promotes the file
to <sha>.zip and records the entry; any failure deletes the temp file.