Function cargo_update::ops::assert_index_path [−][src]
pub fn assert_index_path(
cargo_dir: &Path,
registry_url: &str
) -> Result<PathBuf, Cow<'static, str>>
Expand description
Get the location of the registry index corresponding ot the given URL; if not present – make it and its parents.
As odd as it may be, this can happen (if rarely) and is a supported configuration.
Examples
let index = assert_index_path(&cargo_dir, "https://github.com/rust-lang/crates.io-index").unwrap();
// Use find_package_data() to look for packages