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 neitherregistry
, orindex
are set, then usescrates-io
.force_update
: Iftrue
, forces the index to be updated.token_required
: Iftrue
, the token will be set.