Skip to main content

Module util

Module util 

Source

Re-exportsΒ§

use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use std::time::Duration; πŸ”’
pub use self::canonical_url::CanonicalUrl;
pub(crate) use self::counter::MetricsCounter; πŸ”’
pub use self::dependency_queue::DependencyQueue;
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::CargoResult;
pub use self::errors::CliResult;
pub use self::errors::internal;
pub use self::flock::FileLock;
pub use self::flock::Filesystem;
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::into_url_with_base::IntoUrlWithBase;
pub(crate) use self::io::LimitErrorReader; πŸ”’
pub use self::lockserver::LockServer;
pub use self::lockserver::LockServerClient;
pub use self::lockserver::LockServerStarted;
pub use self::logger::BuildLogger;
pub use self::once::OnceExt;
pub use self::progress::Progress;
pub use self::progress::ProgressStyle;
pub use self::queue::Queue;
pub use self::rustc::Rustc;
pub use self::semver_ext::VersionReqMatchMode;
pub use self::semver_ext::OptVersionReq;
pub use self::semver_ext::VersionExt;
pub use self::unhashed::Unhashed;
pub use self::vcs::FossilRepo;
pub use self::vcs::GitRepo;
pub use self::vcs::HgRepo;
pub use self::vcs::PijulRepo;
pub use self::vcs::existing_vcs_repo;
pub use self::workspace::add_path_args;
pub use self::workspace::path_args;
pub use self::workspace::print_available_benches;
pub use self::workspace::print_available_binaries;
pub use self::workspace::print_available_examples;
pub use self::workspace::print_available_packages;
pub use self::workspace::print_available_tests;
pub use crate::context::GlobalContext;
pub use crate::context::homedir;
pub use local_poll_adapter::LocalPollAdapter;

ModulesΒ§

auth
Registry authentication support.
cache_lock
Support for locking the package and index caches.
canonical_url πŸ”’
command_prelude
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.
frontmatter
graph
hasher πŸ”’
A hasher that produces the same values across releases and platforms.
hex
important_paths
interning
into_url
into_url_with_base πŸ”’
io πŸ”’
job
Job management (mostly for windows)
local_poll_adapter πŸ”’
lockserver πŸ”’
An implementation of IPC locks, guaranteed to be released if a process dies
log_message
Messages for logging.
logger
Build analysis logging infrastructure.
machine_message
network
Utilities for networking.
once πŸ”’
Extension functions for std::sync::OnceLock / std::cell::OnceCell
open
For opening files or URLs with the preferred application.
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
time_span
unhashed πŸ”’
vcs πŸ”’
workspace πŸ”’

StructsΒ§

HumanBytes
Formats a number of bytes into a human readable SI-prefixed size.

EnumsΒ§

ConfigValue
Similar to [toml::Value] but includes the source location where it is defined.

FunctionsΒ§

block_on πŸ”’
Run a future to completion on the current thread.
block_on_stream πŸ”’
Turn a stream into a blocking iterator.
elapsed
get_umask
Get the current umask value.
indented_lines
is_rustup
truncate_with_ellipsis
try_canonicalize

Type AliasesΒ§

StableHasher
Stable 128-bits Sip Hasher