pub async fn resolve_version(
registry: &str,
name: &str,
requested: Option<&str>,
) -> Result<String, PackageError>Expand description
The version of name to install: requested when it names one exactly,
else the registry’s latest (no version, or latest) or newest match
(6.1.x).
§Errors
When the server does not fetch packages, the name or version is malformed, the registry does not know the package or has no matching version, or cannot be reached.