Expand description
Main functions doing actual work.
Use installed_registry_packages() to list the installed packages,
then use intersect_packages() to confirm which ones should be updated,
poll the packages’ latest versions by calling RegistryPackage::pull_version() on them,
continue with doing whatever you wish.
Structs§
- Cargo
Config cargoconfiguration, as obtained from.cargo/config[.toml]- Cargo
Config Environment Normalised String - https://doc.rust-lang.org/cargo/reference/config.html#environment-variables
- Environment
Override - Wrapper that serialises
Noneas a boolean. - GitRepo
Package - A representation of a package a remote git repository.
- Http
Cargo Config - Package
Config - Compilation configuration for one crate.
- Registry
Package - A representation of a package from the main
crates.iorepository. - Sparse
Registry Auth Provider Bundle - Sparse
Registry Config - https://github.com/nabijaczleweli/cargo-update/issues/300
Enums§
- Config
Operation - A single operation to be executed upon configuration of a package.
- Package
Filter Element - One of elements with which to filter required packages.
- Registry
- Either an open git repository with a git registry, or a map of (package, sorted versions), populated by
update_index() - Registry
Tree - A git tree corresponding to the latest revision of a git registry.
- Sparse
Registry Auth Provider - https://doc.rust-lang.org/cargo/reference/registry-authentication.html
Functions§
- assert_
index_ path - Get the location of the registry index corresponding ot the given URL; if not present – make it and its parents.
- auth_
providers - Collect everything needed to get an authentication token for the given registry.
- cargo_
hash - Stolen from and equivalent to
short_hash()from https://github.com/rust-lang/cargo/blob/74f2b400d2be43da798f99f94957d359bc223988/src/cargo/util/hex.rs - crate_
versions - Parse the raw crate descriptor from the repository into a collection of
Semvers. - crates_
file_ in - Follow
install.rootin theconfigorconfig.tomlfile in the cargo directory specified. - find_
git_ db_ repo - Find the bare git repository in the specified directory for the specified crate
- find_
package_ data - Find package data in the specified cargo git index tree.
- find_
proxy - Check if there’s a proxy specified to be used.
- get_
index_ url - Get the URL to update index from, whether it’s “sparse”, and the cargo name for it from the config file parallel to the specified crates file
- installed_
git_ repo_ packages - List the installed packages at the specified location that originate from a remote git repository.
- installed_
registry_ packages - List the installed packages at the specified location that originate from the a cargo registry.
- intersect_
packages - Filter out the installed packages not specified to be updated and add the packages you specify to install, if they aren’t already installed via git.
- open_
index_ repository - Opens or initialises a git repository at
registry, or returns a blank sparse registry. - parse_
registry_ head - Get
FETCH_HEADororigin/HEAD, then unwrap it to the tree it points to. - registry_
shortname - The short filesystem name for the repository, as used by
cargo - split_
package_ path - Split and lower-case
cargo-updateinto[ca, rg, cargo-update],jotinto[3, j, jot], &c. - update_
index - Update the specified index repository from the specified URL.