Module util

Source

Re-exportsยง

pub use self::context::homedir;
pub use self::context::ConfigValue;
pub use self::context::GlobalContext;
pub use self::diagnostic_server::RustfixDiagnosticServer;
pub use self::edit_distance::closest;
pub use self::edit_distance::closest_msg;
pub use self::edit_distance::edit_distance;
pub use self::errors::CliError;
pub use self::errors::internal;
pub use self::errors::CargoResult;
pub use self::errors::CliResult;
pub use self::graph::Graph;
pub use self::hex::hash_u64;
pub use self::hex::short_hash;
pub use self::hex::to_hex;
pub use self::into_url::IntoUrl;
pub use self::rustc::Rustc;

Modulesยง

auth
Registry authentication support.
cache_lock
Support for locking the package and index caches.
canonical_url ๐Ÿ”’
command_prelude
context
Cargoโ€™s config system.
counter ๐Ÿ”’
cpu
credential
Built-in Cargo credential providers
dependency_queue ๐Ÿ”’
A graph-like structure used to represent a set of dependencies and in what order they should be built.
diagnostic_server
A small TCP server to handle collection of diagnostics information in a cross-platform way for the cargo fix command.
edit_distance
errors
flock ๐Ÿ”’
File-locking support.
graph
hasher ๐Ÿ”’
A hasher that produces the same values across releases and platforms.
hex
hostname ๐Ÿ”’
important_paths
interning
into_url
into_url_with_base ๐Ÿ”’
io ๐Ÿ”’
job
Job management (mostly for windows)
lints
lockserver ๐Ÿ”’
An implementation of IPC locks, guaranteed to be released if a process dies
machine_message
network
Utilities for networking.
progress ๐Ÿ”’
Support for CLI progress bars.
queue ๐Ÿ”’
restricted_names
Helpers for validating and checking names like package and crate names.
rustc
semver_eval_ext ๐Ÿ”’
Extend semver::VersionReq with matches_prerelease which doesnโ€™t preclude pre-releases by default.
semver_ext ๐Ÿ”’
sqlite
Utilities to help with working with sqlite.
style
toml
toml_mut
Utilities for in-place editing of Cargo.toml manifests.
vcs ๐Ÿ”’
workspace ๐Ÿ”’

Structsยง

CanonicalUrl
A newtype wrapper around Url which represents a โ€œcanonicalโ€ version of an original URL.
DependencyQueue
FileLock
A locked file.
Filesystem
A โ€œfilesystemโ€ is intended to be a globally shared, hence locked, resource in Cargo.
FossilRepo
GitRepo
HgRepo
HumanBytes
Formats a number of bytes into a human readable SI-prefixed size.
LockServer
LockServerClient
LockServerStarted
PijulRepo
Progress
CLI progress bar.
Queue
A simple, threadsafe, queue of items of type T

Enumsยง

OptVersionReq
ProgressStyle
Indicates the style of information for displaying the amount of progress.

Traitsยง

IntoUrlWithBase
A type that can be interpreted as a relative Url and converted to a Url.
VersionExt

Functionsยง

add_path_args
elapsed
existing_vcs_repo
get_umask
Get the current umask value.
hostname
Returns the hostname of the current system.
indented_lines
is_rustup
path_args
The source path and its current dir for use in compilation.
print_available_benches
print_available_binaries
print_available_examples
print_available_packages
print_available_tests
truncate_with_ellipsis
try_canonicalize

Type Aliasesยง

StableHasher
Stable 128-bits Sip Hasher