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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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