Function cargo_edit::get_latest_dependency
source ยท pub fn get_latest_dependency(
crate_name: &str,
flag_allow_prerelease: bool,
rust_version: Option<RustVersion>,
index: &mut AnyIndexCache,
) -> CargoResult<Dependency>
Expand description
Query latest version from a registry index
The registry argument must be specified for crates from alternative registries.
The latest version will be returned as a Dependency
. This will fail, when
- there is no Internet connection and offline is false.
- summaries in registry index with an incorrect format.
- a crate with the given name does not exist on the registry.