pub struct IndexCache { /* private fields */ }
Implementations§
Source§impl IndexCache
impl IndexCache
pub fn new(certs_source: CertsSource) -> Self
Sourcepub fn has_krate(&mut self, registry: &Url, name: &str) -> CargoResult<bool>
pub fn has_krate(&mut self, registry: &Url, name: &str) -> CargoResult<bool>
Determines if the specified crate exists in the crates.io index
Sourcepub fn has_krate_version(
&mut self,
registry: &Url,
name: &str,
version: &str,
) -> CargoResult<Option<bool>>
pub fn has_krate_version( &mut self, registry: &Url, name: &str, version: &str, ) -> CargoResult<Option<bool>>
Determines if the specified crate version exists in the crates.io index
pub fn update_krate(&mut self, registry: &Url, name: &str) -> CargoResult<()>
pub fn krate( &mut self, registry: &Url, name: &str, ) -> CargoResult<Option<IndexKrate>>
pub fn index<'s>( &'s mut self, registry: &Url, ) -> CargoResult<&'s mut AnyIndexCache>
Auto Trait Implementations§
impl Freeze for IndexCache
impl !RefUnwindSafe for IndexCache
impl Send for IndexCache
impl Sync for IndexCache
impl Unpin for IndexCache
impl !UnwindSafe for IndexCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more