pub struct CrateRegistry {
pub registry_url: String,
}Expand description
Access a crate registry.
Fields§
§registry_url: StringBase URL of the sparse registry.
Implementations§
Source§impl CrateRegistry
impl CrateRegistry
Sourcepub const DEFAULT_REGISTRY: &'static str = "https://index.crates.io"
pub const DEFAULT_REGISTRY: &'static str = "https://index.crates.io"
URL for the crates.io registry.
Sourcepub fn get_crate_versions(
&self,
crate_name: &str,
) -> Result<Vec<String>, GetCrateVersionsError>
pub fn get_crate_versions( &self, crate_name: &str, ) -> Result<Vec<String>, GetCrateVersionsError>
Get all published versions of a crate.
If the crate has not yet been published,
GetCrateVersionsError::NotPublished is returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrateRegistry
impl RefUnwindSafe for CrateRegistry
impl Send for CrateRegistry
impl Sync for CrateRegistry
impl Unpin for CrateRegistry
impl UnwindSafe for CrateRegistry
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