Module download

Source
Expand description

Shared download logic between HttpRegistry and RemoteRegistry.

Constantsยง

CHECKSUM_TEMPLATE ๐Ÿ”’
CRATE_TEMPLATE ๐Ÿ”’
LOWER_PREFIX_TEMPLATE ๐Ÿ”’
PREFIX_TEMPLATE ๐Ÿ”’
VERSION_TEMPLATE ๐Ÿ”’

Functionsยง

download ๐Ÿ”’
Checks if pkg is downloaded and ready under the directory at cache_path. If not, returns a URL to download it from.
finish_download ๐Ÿ”’
Verifies the integrity of data with checksum and persists it under the directory at cache_path.
is_crate_downloaded ๐Ÿ”’
Checks if a tarball of pkg has been already downloaded under the directory at cache_path.