pub struct RegistryConfig {
    pub dl: String,
    pub api: Option<String>,
    pub auth_required: bool,
}
Expand description

The config.json file stored in the index.

Fields§

§dl: String

Download endpoint for all crates.

The string is a template which will generate the download URL for the tarball of a specific version of a crate. The substrings {crate} and {version} will be replaced with the crate’s name and version respectively. The substring {prefix} will be replaced with the crate’s prefix directory name, and the substring {lowerprefix} will be replaced with the crate’s prefix directory name converted to lowercase. The substring {sha256-checksum} will be replaced with the crate’s sha256 checksum.

For backwards compatibility, if the string does not contain any markers ({crate}, {version}, {prefix}, or ``{lowerprefix}), it will be extended with /{crate}/{version}/download` to support registries like crates.io which were created before the templating setup was created.

§api: Option<String>

API endpoint for the registry. This is what’s actually hit to perform operations like yanks, owner modifications, publish new crates, etc. If this is None, the registry does not support API commands.

§auth_required: bool

Whether all operations require authentication.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 56 bytes