pub fn new(crate_download: impl Into<String>) -> Self {
        let crate_download = crate_download.into();

        debug_assert!(Url::parse(&crate_download).is_ok());

        Self {
            dl: crate_download,
            api: None,
            allowed_registries: Vec::default(),
        }
    }
// Create a new [`Config`]
//
// only the download Url for crates is required. optional values can be set
// using the builder methods.
//
// # Example
// ```
// use crate_index::{Url, index::Config};
//
// let download = "https://my-crates-server.com/api/v1/crates/{crate}/{version}/download";
//
// // Create a new Config struct, setting the url for downloading .crate files
// let config = Config::new(download)
//
//     // Optionally set the URL that cargo should use to publish, yank, etc.
//     .with_api(Url::parse("https://my-crates-server.com/").unwrap())
//
//     // Set registries that crates within this registry are allowed to depend on
//     .with_allowed_registry(Url::parse("https://github.com/rust-lang/crates.io-index").unwrap());
Create a new [`Config`]
only the download Url for crates is required. optional values can be set
using the builder methods.
Create a new [ ` Config ` ] only the download Url for crates is required . optional values can be set using the builder methods .
pub fn new(crate_download: impl Into<String>) -> Self {
        let crate_download = crate_download.into();
        debug_assert!(Url::parse(&crate_download).is_ok());
        Self {
            dl: crate_download,
            api: None,
            allowed_registries: Vec::default(),
        }
    }
pub fn new ( crate_download : impl Into < String > ) -> Self { let crate_download = crate_download . into ( ) ; debug_assert ! ( Url parse ( crate_download ) is_ok ( ) ) ; Self { dl : crate_download , api : None , allowed_registries : Vec :: default ( ) , } }
Create a new [`Config`]
only the download Url for crates is required.
Create a new [ ` Config ` ] only the download Url for crates is required .
crate_download
impl Into<String>
example
```
use crate_index::{Url, index::Config}.



Create a new Config struct, setting the url for downloading .crate files
let config = Config::new(download)

Optionally set the URL that cargo should use to publish, yank, etc.


` ` ` use crate_index :: { Url index :: Config } . Create a new Config struct setting the url for downloading . crate files let config = Config :: new ( download ) Optionally set the URL that cargo should use to publish yank etc .