Struct cargo::sources::registry::RegistryConfig
source · 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§
source§impl Clone for RegistryConfig
impl Clone for RegistryConfig
source§fn clone(&self) -> RegistryConfig
fn clone(&self) -> RegistryConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more