pub fn download_crates(
    iface: &Arc<NetworkInterface>,
    remote_endpoint: IpEndpoint,
    update_build: &str,
    crates: BTreeSet<String>
) -> Result<Vec<DownloadedFile>, &'static str>
Expand description

Connects to the update server over the given network interface and downloads the object files for the specified crates.

It also downloads the checksum file for each crate object file in order to verify that each object file was completely downloaded correctly.

A list of available update builds can be obtained by calling download_available_update_builds().

Arguments

  • iface: a reference to an initialized network interface for sockets to use.
  • update_build: the string name of the update build that the downloaded crates will belong to.
  • crates: a set of crate names, e.g., “k#my_crate-3d0cd20d4e1d4ba9.o”, that will be downloaded from the given update_build on the server.

Returns the list of crate object files (as DownloadedFiles) in the given update_build.