Struct cargo_whatfeatures::Registry
source · pub struct Registry { /* private fields */ }
Expand description
Local disk registry (cargo and our own)
Implementations§
source§impl Registry
impl Registry
sourcepub fn from_local() -> Result<Self>
pub fn from_local() -> Result<Self>
Create a registry from the local cache (cargos and ours)
sourcepub fn get(&self, crate_name: &str, crate_version: &str) -> Option<&Crate>
pub fn get(&self, crate_name: &str, crate_version: &str) -> Option<&Crate>
Tries to get the crate/version from the registry
sourcepub fn maybe_latest(&self, crate_name: &str) -> Option<&Crate>
pub fn maybe_latest(&self, crate_name: &str) -> Option<&Crate>
Tries to the the latest version from the cached registry
sourcepub fn purge_local_cache(&mut self) -> Result<usize>
pub fn purge_local_cache(&mut self) -> Result<usize>
Purge the local cache, returning how many crates it removed
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnwindSafe for Registry
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