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§
Provided Methods§
Sourcefn fetch_bytes(
&self,
tag: &str,
dest: &Path,
progress: &mut dyn FnMut(&str),
) -> Result<Fetched, String>
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".