Struct crates_index::Index
[−]
[src]
pub struct Index { /* fields omitted */ }
Wrapper around managing the crates.io-index git repository
Methods
impl Index
[src]
pub fn new<P: Into<PathBuf>>(path: P) -> Index
[src]
Construct a new Index supplying a path where the index lives or should live
pub fn exists(&self) -> bool
[src]
Determines if a crates.io repository exists at self.path
pub fn retrieve(&self) -> Result<()>
[src]
Downloads the index to the path specified from the constructor
pub fn update(&self) -> Result<()>
[src]
Assumes the index already exists at self.path
, and updates it
pub fn retrieve_or_update(&self) -> Result<()>
[src]
Downloads the index to the path specified from the constructor
pub fn crate_(&self, crate_name: &str) -> Option<Crate>
[src]
Retrieve a single crate by name (case insensitive) from the index
ⓘImportant traits for Cratespub fn crates(&self) -> Crates
[src]
ⓘImportant traits for Crates
Retrieve an iterator over all the crates in the index
ⓘImportant traits for CrateIndexPathspub fn crate_index_paths(&self) -> CrateIndexPaths
[src]
ⓘImportant traits for CrateIndexPaths
Returns all the crate index file paths in the index
pub fn path(&self) -> &Path
[src]
Get the index directory.
Trait Implementations
impl Debug for Index
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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