Struct palletizer::Config[][src]

pub struct Config {
    pub download_url: String,
    pub api_url: String,
    pub index_dir: PathBuf,
    pub crate_dir: PathBuf,
    pub allowed_registries: Vec<String>,
}
Expand description

The registry configuration.

Fields

download_url: String

The download URL for crates.

See also https://doc.rust-lang.org/cargo/reference/registries.html#index-format

api_url: String

The API URL for cargo.

See also https://doc.rust-lang.org/cargo/reference/registries.html#index-format

index_dir: PathBuf

The path to the index repository.

Relative paths are resolved relative to directory that contains the config file.

crate_dir: PathBuf

The path where crates are stored.

Relative paths are resolved relative to directory that contains the config file.

allowed_registries: Vec<String>

Allowed external registries for crates in this registry.

Packages with dependencies from other registries will be refused.

Each entry should be the full URL of the index repository of an external registry.

Implementations

Encode the configuration as JSON for Cargo.

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

Serialize this value into the given Serde serializer. 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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.