Crate crates_index
source ·Expand description
Library for retrieving and interacting with the crates.io index.
Examples
extern crate crates_index;
let index = crates_index::Index::new("_index");
if !index.exists() {
index.retrieve().expect("Could not fetch crates.io index");
}
for crate_ in index.crates() {
let latest_version = crate_.latest_version();
println!("crate name: {}", latest_version.name());
println!("crate version: {}", latest_version.version());
}
Structs
A single crate that contains many published versions
Constructed from
Index::crate_index_paths
Constructed from
Index::crates
A single dependency of a specific crate version
The Error type.
Wrapper around managing the crates.io-index git repository
A single version of a crate published to the index
Enums
The kind of an error.
Traits
Additional methods for
Result
, for easy interaction with this crate.Type Definitions
Convenient wrapper around
std::Result
.