Struct crates_index::IndexConfig[][src]

pub struct IndexConfig {
    pub dl: String,
    pub api: Option<String>,
}

Global configuration of an index, reflecting the contents of config.json as specified at https://doc.rust-lang.org/cargo/reference/registries.html#index-format

Fields

dl: Stringapi: Option<String>

Implementations

impl IndexConfig[src]

pub fn download_url(&self, name: &str, version: &str) -> Option<String>[src]

Get the URL from where the specified package can be downloaded. This method assumes the particular version is present in the registry, and does not verify that it is.

Trait Implementations

impl Clone for IndexConfig[src]

impl Debug for IndexConfig[src]

impl<'de> Deserialize<'de> for IndexConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.