Expand description
Show and Edit Cargo’s Manifest Files
§Semver Compatibility
cargo-edit’s versioning tracks compatibility for the binaries, not the API. We upload to
crates.io to distribute the binary. If using this as a library, be sure to pin the version
with a =
version requirement operator. Note though that our goal is for cargo-edit
to go
away as we move things into cargo.
Structs§
- AnyIndex
Cache - CliError
- The CLI error is the error type used at Cargo’s CLI-layer.
- Crate
Spec - User-specified crate
- Dependency
- A dependency handled by Cargo
- Index
Cache - Local
Index - Local
Manifest - A Cargo manifest that is available locally.
- Manifest
- A Cargo manifest
- Path
Source - Dependency from a local path
- Registry
Source - Dependency from a registry
- Remote
Index - Rust
Version - Simplified represetation of
package.rust-version
Enums§
- AnyIndex
- Certs
Source - Color
- The set of available colors for the terminal foreground/background.
- Color
Choice - ColorChoice represents the color preferences of an end user.
- Source
- Primary location of a dependency
Traits§
- Context
- Provides the
context
method forResult
. - Version
Ext - Additional version functionality
Functions§
- colorize_
stderr - Whether to color logged output
- find
- If a manifest is specified, return that one, otherise perform a manifest search starting from
the current directory.
If a manifest is specified, return that one. If a path is specified, perform a manifest search
starting from there. If nothing is specified, start searching from the current directory
(
cwd
). - get_
compatible_ dependency - Find the highest version compatible with a version req
- get_
dep_ version - Get a dependency’s version from its entry in the dependency table
- get_
latest_ dependency - Query latest version from a registry index
- manifest_
from_ pkgid - Takes a pkgid and attempts to find the path to it’s
Cargo.toml
, usingcargo
’s metadata - registry_
url - Find the URL of a registry
- set_
dep_ version - Set a dependency’s version in its entry in the dependency table
- shell_
note - Print a styled warning message.
- shell_
print - Print a message with a colored title in the style of Cargo shell messages.
- shell_
status - Print a styled action message.
- shell_
warn - Print a styled warning message.
- shell_
write_ stderr - Print a part of a line with formatting
- shell_
write_ stdout - Print a part of a line with formatting
- upgrade_
requirement - Upgrade an existing requirement to a new version
Type Aliases§
- Cargo
Result - Common result type
- CliResult
- CLI-specific result
- Error
- Common error type