Skip to main content

list_versions

Function list_versions 

Source
pub fn list_versions(crate_name: &str) -> Result<Vec<String>, Error>
Expand description

Returns all published version strings for a crate from the crates.io index.

§Errors

Returns Error::CrateNotFoundOnIndex when the crate is absent from the index. Returns other Error variants on index access failures.

§Examples

use kdeets_lib::list_versions;

let versions = list_versions("serde")?;
assert!(versions.contains(&"1.0.0".to_string()));