Enum tame_index::index::ComboIndex
source · #[non_exhaustive]pub enum ComboIndex {
Git(RemoteGitIndex),
Sparse(RemoteSparseIndex),
Local(LocalRegistry),
}
Available on crate features
git
and sparse
only.Expand description
A wrapper around either a RemoteGitIndex
or RemoteSparseIndex
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(RemoteGitIndex)
A standard git based registry index. No longer the default for crates.io as of 1.70.0
Sparse(RemoteSparseIndex)
An HTTP sparse index
Local(LocalRegistry)
Available on crate feature
local
only.A local registry
Implementations§
source§impl ComboIndex
impl ComboIndex
sourcepub fn krate(
&self,
name: KrateName<'_>,
write_cache_entry: bool,
lock: &FileLock
) -> Result<Option<IndexKrate>, Error>
pub fn krate( &self, name: KrateName<'_>, write_cache_entry: bool, lock: &FileLock ) -> Result<Option<IndexKrate>, Error>
Retrieves the index metadata for the specified crate name, optionally writing a cache entry for it if there was not already an up to date one
Note no cache entry is written if this is a Local
registry as they do
not use .cache files
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 cached crate metadata if it exists
Trait Implementations§
source§impl From<LocalRegistry> for ComboIndex
Available on crate feature local
only.
impl From<LocalRegistry> for ComboIndex
Available on crate feature
local
only.source§fn from(local: LocalRegistry) -> Self
fn from(local: LocalRegistry) -> Self
Converts to this type from the input type.
source§impl From<RemoteGitIndex> for ComboIndex
impl From<RemoteGitIndex> for ComboIndex
source§fn from(index: RemoteGitIndex) -> Self
fn from(index: RemoteGitIndex) -> Self
Converts to this type from the input type.
source§impl From<RemoteSparseIndex> for ComboIndex
impl From<RemoteSparseIndex> for ComboIndex
source§fn from(index: RemoteSparseIndex) -> Self
fn from(index: RemoteSparseIndex) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ComboIndex
impl !RefUnwindSafe for ComboIndex
impl !Send for ComboIndex
impl !Sync for ComboIndex
impl Unpin for ComboIndex
impl !UnwindSafe for ComboIndex
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