Function cargo::ops::registry::registry

source ·
fn registry(
    config: &Config,
    token_from_cmdline: Option<Secret<&str>>,
    reg_or_index: Option<&RegistryOrIndex>,
    force_update: bool,
    token_required: Option<Operation<'_>>
) -> CargoResult<(Registry, RegistrySourceIds)>
Expand description

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

  • 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.