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<P: Into<PathBuf>>(path: P) -> Index
[src]
Construct a new Index supplying a path where the index lives or should live
fn exists(&self) -> bool
[src]
Determines if a crates.io repository exists at self.path
fn retrieve(&self) -> Result<()>
[src]
Downloads the index to the path specified from the constructor
fn update(&self) -> Result<()>
[src]
Assumes the index already exists at self.path
, and updates it
fn retrieve_or_update(&self) -> Result<()>
[src]
Downloads the index to the path specified from the constructor
fn crate_(&self, crate_name: &str) -> Option<Crate>
[src]
Retrieve a single crate by name (case insensitive) from the index
fn crates(&self) -> Crates
[src]
Retrieve an iterator over all the crates in the index
fn crate_index_paths(&self) -> CrateIndexPaths
[src]
Returns all the crate index file paths in the index
fn path(&self) -> &Path
[src]
Get the index directory.
Trait Implementations
impl Debug for Index
[src]
impl Clone for Index
[src]
fn clone(&self) -> Index
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more