cargo::ops::registry

# Function registry

Source

    fn registry<'gctx>(
        gctx: &'gctx GlobalContext,
        source_ids: &RegistrySourceIds,
        token_from_cmdline: Option<Secret<&str>>,
        reg_or_index: Option<&RegistryOrIndex>,
        force_update: bool,
        token_required: Option<Operation<'_>>,
    ) -> CargoResult<(Registry, RegistrySource<'gctx>)>

Expand description

Returns the `Registry` and `Source` based on command-line and config settings.

- `source_ids`: The source IDs for the registry. It contains the original source ID and the replacement source ID.
- `token_from_cmdline`: The token from the command-line. If not set, uses the token from the config.
- `index`: The index URL from the command-line.
- `registry`: The registry name from the command-line. If neither `registry`, or `index` are set, then uses `crates-io`.
- `force_update`: If `true`, forces the index to be updated.
- `token_required`: If `true`, the token will be set.