[−][src]Struct crates_index::Index
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 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
ⓘImportant traits for Cratespub fn crates(&self) -> Crates
[src]
Retrieve an iterator over all the crates in the index
ⓘImportant traits for CrateIndexPathspub fn crate_index_paths(&self) -> CrateIndexPaths
[src]
Returns all the crate index file paths in the index
pub fn path(&self) -> &Path
[src]
Get the index directory.
Trait Implementations
impl PartialEq<Index> for Index
[src]
impl Clone for Index
[src]
fn clone(&self) -> Index
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Index
[src]
Auto Trait Implementations
impl Send for Index
impl Unpin for Index
impl Sync for Index
impl UnwindSafe for Index
impl RefUnwindSafe for Index
Blanket Implementations
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.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,