Struct crates_index::BareIndex [−][src]
pub struct BareIndex { pub url: String, // some fields omitted }
Access to a “bare” git index that fetches files directly from the repo instead of local checkout
Uses Cargo’s cache
Fields
url: String
Implementations
impl BareIndex
[src]
impl BareIndex
[src]pub fn from_url(url: &str) -> Result<Self, Error>
[src]
pub fn from_url(url: &str) -> Result<Self, Error>
[src]Creates a bare index from a provided URL, opening the same location on disk that cargo uses for that registry index.
pub fn with_path(path: PathBuf, url: &str) -> Self
[src]
pub fn with_path(path: PathBuf, url: &str) -> Self
[src]Creates a bare index at the provided path with the specified repository URL.
pub fn new_cargo_default() -> Self
[src]
pub fn new_cargo_default() -> Self
[src]Creates an index for the default crates.io registry, using the same disk location as cargo itself.
pub fn open_or_clone(&self) -> Result<BareIndexRepo<'_>, Error>
[src]
pub fn open_or_clone(&self) -> Result<BareIndexRepo<'_>, Error>
[src]Opens the local index, which acts as a kind of lock for source control operations