Struct crates_index::Index [−][src]
pub struct Index { /* fields omitted */ }
Wrapper around managing the crates.io-index git repository
Implementations
impl Index
[src]
impl Index
[src]pub fn new<P: Into<PathBuf>>(path: P) -> 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 new_cargo_default() -> Index
[src]
pub fn new_cargo_default() -> Index
[src]Use Cargo’s own index in CARGO_HOME
(~/.cargo/registry/index
)
pub fn retrieve(&self) -> Result<(), Error>
[src]
pub fn retrieve(&self) -> Result<(), Error>
[src]Downloads the index to the path specified from the constructor
pub fn update(&self) -> Result<(), Error>
[src]
pub fn update(&self) -> Result<(), Error>
[src]Assumes the index already exists at self.path
, and updates it
pub fn retrieve_or_update(&self) -> Result<(), Error>
[src]
pub fn retrieve_or_update(&self) -> Result<(), Error>
[src]Downloads the index to the path specified from the constructor
pub fn crate_(&self, crate_name: &str) -> Option<Crate>
[src]
pub fn crate_(&self, crate_name: &str) -> Option<Crate>
[src]Retrieve a single crate by name (case insensitive) from the index
pub fn crate_index_paths(&self) -> CrateIndexPathsⓘNotable traits for CrateIndexPaths
impl Iterator for CrateIndexPaths type Item = PathBuf;
[src]
👎 Deprecated: This method won’t work with BareIndex
pub fn crate_index_paths(&self) -> CrateIndexPathsⓘNotable traits for CrateIndexPaths
impl Iterator for CrateIndexPaths type Item = PathBuf;
[src]This method won’t work with BareIndex
Returns all the crate index file paths in the index
pub fn index_config(&self) -> Result<IndexConfig, Error>
[src]
pub fn index_config(&self) -> Result<IndexConfig, Error>
[src]Get the global configuration of the index.
Trait Implementations
impl StructuralPartialEq for Index
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more