pub struct ImpactArgs {Show 16 fields
pub test: bool,
pub format: Format,
pub since: String,
pub manifest_dir: Option<PathBuf>,
pub confidence_min: f64,
pub fail_on: Option<FailOn>,
pub semver_checks: bool,
pub rust_analyzer: bool,
pub budget: usize,
pub context: bool,
pub features: Vec<String>,
pub all_features: bool,
pub no_default_features: bool,
pub macro_expand: bool,
pub feature_powerset: bool,
pub cache: bool,
}Expand description
Command-line arguments for cargo impact.
Fields§
§test: boolEmit a cargo-nextest filter expression instead of the structured
report. Overrides --format.
format: FormatOutput format for the structured report.
since: StringGit ref to diff against. Uncommitted (staged + unstaged) changes are always included regardless of this value.
manifest_dir: Option<PathBuf>Repository root. Defaults to the current working directory.
confidence_min: f64Hide findings whose confidence is below this threshold (0.0–1.0).
fail_on: Option<FailOn>Exit non-zero if any finding at this severity class or above is
emitted. Useful for CI gating. high only gates on high-severity
findings; medium gates on medium+high; low gates on any non-unknown.
semver_checks: boolOpt in to public-API breakage detection via cargo-semver-checks.
Off by default because the underlying tool builds rustdoc JSON twice
and typically takes 10–30 seconds. Requires cargo-semver-checks on
PATH; if absent, a stderr warning is printed and the check is
skipped (non-fatal).
rust_analyzer: boolOpt in to rust-analyzer-backed analysis for Proven-tier findings.
v0.3-alpha scaffolding: the flag is wired through and the tool’s
presence on PATH is detected, but the LSP integration itself is a
stub that returns no findings. Full implementation lands in a
follow-up v0.3 release (see README §11).
budget: usizeCharacter budget for the rendered output — useful for keeping
--format markdown inside an AI agent’s context window. 0 (the
default) means unlimited. Only affects the markdown renderer;
text is for human terminals, JSON is for programmatic consumers
who can filter themselves. Chars ≈ ¼ token for mainstream models
(claude, gpt-4-ish tokenizers), so --budget=32000 fits ≈ 8k
tokens. The header + summary always render even if they alone
exceed the budget; severity sections and the checklist are
truncated in priority order (severity → tier → confidence) with
a footer noting how many findings were dropped.
context: boolEmit a newline-delimited list of files implicated by the blast
radius (one repo-relative path per line) instead of the normal
report. Pipes directly into
cargo-context’s
--files-from - flag for the canonical handoff:
cargo impact --context | cargo context --files-from -.
Also consumable by any file-list tool (xargs cat, grep -l,
etc.). Unique paths only. Overrides --format and --test.
features: Vec<String>Activate these Cargo features for cfg evaluation. Accepts a
comma-separated list and/or repeated flags. Takes precedence over
the manifest’s default set and is unioned with it unless
--no-default-features is also supplied. Transitively expands
feature dependencies per the manifest’s [features] table.
all_features: boolActivate every feature declared in the manifest’s [features]
table. Mutually useful with --no-default-features when you want
to audit the full surface instead of just the default view.
no_default_features: boolSkip the manifest’s default feature list. Mirrors cargo’s
--no-default-features.
macro_expand: boolOpt in to cargo-expand-backed trait-impl detection for impls
synthesized by derive and attribute macros (serde, tokio,
clap, thiserror, …). Requires cargo-expand on PATH; install
via cargo install cargo-expand. When absent or expansion
fails, a stderr warning is printed and the check is skipped
(non-fatal). Off by default because the expansion pass adds
10-60s depending on crate size.
feature_powerset: boolRun analysis across a depth-1 feature powerset (baseline +
--no-default-features + --all-features) and surface
findings that the baseline view missed. Intended for CI —
triples analyzer cost so off by default. Findings visible
only under a non-baseline set are annotated in evidence
with the feature set that revealed them. A full feature
powerset (O(2^N) over N features) is out of scope; the
depth-1 view catches the usual feature-gated blast radius
(std/no_std, sync/async, feature = “foo” paths) without
combinatorial blow-up.
cache: boolEnable content-hash caching for incremental analysis.
Caches top-level symbol extraction by file content hash, avoiding
re-parsing unchanged fallback files across runs. Cache lives at
target/cargo-impact/cache/.
Trait Implementations§
Source§impl Args for ImpactArgs
impl Args for ImpactArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for ImpactArgs
impl Clone for ImpactArgs
Source§fn clone(&self) -> ImpactArgs
fn clone(&self) -> ImpactArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for ImpactArgs
impl CommandFactory for ImpactArgs
Source§impl Debug for ImpactArgs
impl Debug for ImpactArgs
Source§impl FromArgMatches for ImpactArgs
impl FromArgMatches for ImpactArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.