Skip to main content

download

Function download 

Source
pub async fn download(
    registry: &str,
    name: &str,
    version: &str,
    max_bytes: u64,
) -> Result<Vec<u8>, PackageError>
Expand description

Downloads name at version from registry, refusing a tarball larger than max_bytes.

ยงErrors

When the server does not fetch packages, the name or version is malformed, the registry does not have that version, the download is too large, or the registry cannot be reached.