download in cargo::sources::registry::download - Rust
Description: Checks if `pkg` is downloaded and ready under the directory at `cache_path`. If not, returns a URL to download it from.

Skip to main content

## download

# Function download

Source

    pub(super) fn download(
        cache_path: &Filesystem,
        gctx: &GlobalContext,
        encoded_registry_name: InternedString,
        pkg: PackageId,
        checksum: &str,
        registry_config: RegistryConfig,
    ) -> CargoResult<MaybeLock>

Expand description

Checks if `pkg` is downloaded and ready under the directory at `cache_path`. If not, returns a URL to download it from.

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