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