Enum tame_index::index::ComboIndexCache
source · #[non_exhaustive]pub enum ComboIndexCache {
Git(GitIndex),
Sparse(SparseIndex),
Local(LocalRegistry),
}
Expand description
Provides simpler access to the cache for an index, regardless of the registry kind
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Git(GitIndex)
A git index
Sparse(SparseIndex)
A sparse HTTP index
Local(LocalRegistry)
Available on crate feature
local
only.A local registry
Implementations§
source§impl ComboIndexCache
impl ComboIndexCache
sourcepub fn cached_krate(
&self,
name: KrateName<'_>,
lock: &FileLock
) -> Result<Option<IndexKrate>, Error>
pub fn cached_krate( &self, name: KrateName<'_>, lock: &FileLock ) -> Result<Option<IndexKrate>, Error>
Retrieves the index metadata for the specified crate name
sourcepub fn cache_path(&self, name: KrateName<'_>) -> PathBuf
pub fn cache_path(&self, name: KrateName<'_>) -> PathBuf
Gets the path to the cache entry for the specified crate
Trait Implementations§
source§impl From<GitIndex> for ComboIndexCache
impl From<GitIndex> for ComboIndexCache
source§impl From<SparseIndex> for ComboIndexCache
impl From<SparseIndex> for ComboIndexCache
source§fn from(si: SparseIndex) -> Self
fn from(si: SparseIndex) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ComboIndexCache
impl RefUnwindSafe for ComboIndexCache
impl Send for ComboIndexCache
impl Sync for ComboIndexCache
impl Unpin for ComboIndexCache
impl UnwindSafe for ComboIndexCache
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more