Struct crates_index::Index
[−]
[src]
pub struct Index { /* fields omitted */ }
Wrapper around managing the crates.io-index git repository
Methods
impl Index
[src]
fn new(path: PathBuf) -> Index
Construct a new Index supplying a path where the index lives or should live
fn exists(&self) -> bool
Determines if a crates.io repository exists at self.path
fn retrieve(&self) -> Result<()>
Downloads the index to the path specified from the constructor
fn update(&self) -> Result<()>
Assumes the index already exists at self.path
, and updates it
fn retrieve_or_update(&self) -> Result<()>
Downloads the index to the path specified from the constructor
fn crate_(&self, crate_name: &str) -> Option<Crate>
Retrieve a single crate by name (case insensitive) from the index
fn crates(&self) -> Crates
Retrieve an iterator over all the crates in the index
fn crate_index_paths(&self) -> CrateIndexPaths
Returns all the crate index file paths in the index