Struct crates_index::Index [−][src]
Wrapper around managing the crates.io-index git repository
Implementations
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 new_cargo_default() -> Index
[src]
Use Cargo’s own index in CARGO_HOME
(~/.cargo/registry/index
)
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
pub fn crates(&self) -> Cratesⓘ
[src]
Retrieve an iterator over all the crates in the index
pub fn crate_index_paths(&self) -> CrateIndexPathsⓘNotable traits for CrateIndexPaths
impl Iterator for CrateIndexPaths type Item = PathBuf;
[src]
Notable traits for CrateIndexPaths
impl Iterator for CrateIndexPaths type Item = PathBuf;
Returns all the crate index file paths in the index
pub fn path(&self) -> &Path
[src]
Get the index directory.
Trait Implementations
impl Clone for Index
[src]
impl Debug for Index
[src]
impl PartialEq<Index> for Index
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,