pub fn initialise<'a>(root: impl Into<PathBuf>, download: impl Into<String>) -> Builder<'a> {
        let root = root.into();
        let tree_builder = Tree::initialise(&root, download);
        let origin = None;
        let identity = None;

        Builder {
            tree_builder,
            root,
            origin,
            identity,
        }
    }
/// Create a new index.
///
/// The root path, and the URL for downloading .crate files is required.
/// Additional options can be set using the builder API (see
/// [`Builder`] for options).
///
/// # Example
///
/// ## Basic Config
/// ```no_run
/// use crate_index::Index;
/// # use crate_index::{Error, Url};
/// # async {
/// let root = "/index";
/// let download = "https://my-crates-server.com/api/v1/crates/{crate}/{version}/download";
///
/// let index = Index::initialise(root, download).build().await?;
/// # Ok::<(), Error>(())
/// # };
/// ```
/// ## More Options
///
/// ```no_run
/// use crate_index::{Index, Url};
/// # use crate_index::Error;
/// # async {
/// let root = "/index";
/// let download = "https://my-crates-server.com/api/v1/crates/{crate}/{version}/download";
/// let origin = Url::parse("https://github.com/crates/index.git").unwrap();
///
/// let index = Index::initialise(root, download)
///     .api(Url::parse("https://my-crates-server.com/").unwrap())
///     .allowed_registry(Url::parse("https://my-intranet:8080/index").unwrap())
///     .allow_crates_io()
///     .origin(origin)
///     .build()
///     .await?;
/// # Ok::<(), Error>(())
/// # };
/// ```
Create a new index.
The root path, and the URL for downloading .crate files is required.
Additional options can be set using the builder API (see
[`Builder`] for options).
Create a new index . The root path and the URL for downloading . crate files is required . Additional options can be set using the builder API ( see [ ` Builder ` ] for options ) .
pub fn initialise<'a>(root: impl Into<PathBuf>, download: impl Into<String>) -> Builder<'a> {
        let root = root.into();
        let tree_builder = Tree::initialise(&root, download);
        let origin = None;
        let identity = None;
        Builder {
            tree_builder,
            root,
            origin,
            identity,
        }
    }
pub fn initialise < ' a > ( root : impl Into < PathBuf > , download : impl Into < String > ) -> Builder < ' a > { let root = root . into ( ) ; let tree_builder = Tree :: initialise ( & root , download ) ; let origin = None ; let identity = None ; Builder { tree_builder , root , origin , identity , } }
Create a new index.
Create a new index .
root
impl Into<PathBuf>
download
impl Into<String>
example
None
basic config
```no_run
use crate_index::Index.
` ` ` no_run use crate_index :: Index .
use crate_index::{error, url};
None
async {


let index = Index::initialise(root, download).build().await?.
let index = Index :: initialise ( root download ) . build () . await? .
ok::<(), error>(())
None
};
None
more options
```no_run
use crate_index::{Index, Url}.
` ` ` no_run use crate_index :: { Index Url } .
use crate_index::error;
None
async {
None
ok::<(), error>(())
None
};
None