Function cargo::sources::registry::download::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.