pub fn fetch(url: &str, cache_dir: &Path) -> Result<PathBuf>Expand description
Fetches url into cache_dir, revalidating any cached copy, and
returns the cached file path. When offline with a cached copy present,
it warns and reuses the copy.
ยงErrors
Returns an error on a URL without a filename component, an HTTP failure with no cached copy to fall back on, or an I/O failure writing the cache.