Struct crates_index::Index
source · pub struct Index { /* private fields */ }
Expand description
Wrapper around managing the crates.io-index git repository
Implementations
sourceimpl Index
impl Index
sourcepub fn new<P: Into<PathBuf>>(path: P) -> Index
pub fn new<P: Into<PathBuf>>(path: P) -> Index
Construct a new Index supplying a path where the index lives or should live
sourcepub fn retrieve(&self) -> Result<()>
pub fn retrieve(&self) -> Result<()>
Downloads the index to the path specified from the constructor
sourcepub fn update(&self) -> Result<()>
pub fn update(&self) -> Result<()>
Assumes the index already exists at self.path
, and updates it
sourcepub fn retrieve_or_update(&self) -> Result<()>
pub fn retrieve_or_update(&self) -> Result<()>
Downloads the index to the path specified from the constructor
sourcepub fn crate_(&self, crate_name: &str) -> Option<Crate>
pub fn crate_(&self, crate_name: &str) -> Option<Crate>
Retrieve a single crate by name (case insensitive) from the index
sourcepub fn crate_index_paths(&self) -> CrateIndexPaths ⓘ
pub fn crate_index_paths(&self) -> CrateIndexPaths ⓘ
Returns all the crate index file paths in the index
Trait Implementations
impl StructuralPartialEq for Index
Auto Trait Implementations
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more