finish_download in cargo::sources::registry::download - Rust
Description: Verifies the integrity of `data` with `checksum` and persists it under the directory at `cache_path`.

Skip to main content

## finish_download

# Function finish_download

Source

    pub(super) fn finish_download(
        cache_path: &Filesystem,
        gctx: &GlobalContext,
        encoded_registry_name: InternedString,
        pkg: PackageId,
        checksum: &str,
        data: &[u8],
    ) -> CargoResult<File>

Expand description

Verifies the integrity of `data` with `checksum` and persists it under the directory at `cache_path`.

This is primarily called by `RegistryData::finish_download`.