#[non_exhaustive]pub struct Config {
pub manifest_path: Option<PathBuf>,
pub packages: Vec<String>,
pub all: bool,
pub check: bool,
pub workers: Option<usize>,
pub channel_capacity: Option<usize>,
pub rustfmt_args: Vec<String>,
pub batch_size: Option<usize>,
pub experimental_cache: bool,
pub warnings: bool,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.manifest_path: Option<PathBuf>§packages: Vec<String>§all: boolFormat every workspace member, regardless of manifest_path’s implicit
package selection. Mirrors cargo fmt --all.
check: bool§workers: Option<usize>§channel_capacity: Option<usize>§rustfmt_args: Vec<String>§batch_size: Option<usize>Crates per rustfmt invocation. Higher values amortize spawn cost
(~40ms/invocation on M-series) at the cost of coarser scheduling
granularity. None → 3 (the curve is flat across bs=12-48 thanks
to the priority queue, so a small default keeps tiny workspaces
from collapsing into one batch).
experimental_cache: boolExperimental: skip rustfmt for crates whose *.rs file mtimes
match the prior successful run. After a write that actually
rewrote files, the next run will miss (mtimes shifted) and
re-dispatch — correct, just one wasted invocation. See
cache.rs for soundness caveats.
warnings: boolEmit advisory warnings to stderr (cross-crate file claims,
stable-rustfmt-on-PATH). Off by default — these are silent in
stock cargo fmt too, and the noise isn’t worth it for most users.