Skip to main content

Fetch

Trait Fetch 

Source
pub trait Fetch {
    // Required method
    fn fetch(
        &self,
        tag: &str,
        dest: &Path,
        progress: &mut dyn FnMut(&str),
    ) -> Result<Verification, String>;

    // Provided method
    fn fetch_bytes(
        &self,
        tag: &str,
        dest: &Path,
        progress: &mut dyn FnMut(&str),
    ) -> Result<Fetched, String> { ... }
}
Expand description

The download-and-prove seam. The shipped client carries HttpsFetch; the CLI’s guards script this, which keeps cargo test off the network the way its CoreSeam keeps it off AWS.

Required Methods§

Source

fn fetch( &self, tag: &str, dest: &Path, progress: &mut dyn FnMut(&str), ) -> Result<Verification, String>

Download release tag’s daemon asset to dest and prove the bytes, reporting progress lines as it goes. The error is prose: the caller owns the remedies.

Provided Methods§

Source

fn fetch_bytes( &self, tag: &str, dest: &Path, progress: &mut dyn FnMut(&str), ) -> Result<Fetched, String>

Return the verified bytes. dest is a private temporary file for legacy implementations of Self::fetch; production fetches return their verified in-memory download without reading it back from disk.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§