cargo_cargofmt/config/
options.rs

1#[derive(Copy, Clone, Default, Debug, serde::Deserialize)]
2pub enum NewlineStyle {
3    /// Auto-detect based on the raw source input.
4    #[default]
5    Auto,
6    /// Force CRLF (`\r\n`).
7    Windows,
8    /// Force CR (`\n`).
9    Unix,
10    /// `\r\n` in Windows, `\n` on other platforms.
11    Native,
12}
13
14/// Controls how width heuristics are calculated for formatting decisions.
15#[derive(Copy, Clone, Default, Debug, serde::Deserialize)]
16pub enum UseSmallHeuristics {
17    /// Calculate widths as percentage of `max_width` (e.g., `array_width` = 60%).
18    #[default]
19    Default,
20    /// Disable width heuristics (always use vertical layout).
21    Off,
22    /// Use `max_width` for all width settings.
23    Max,
24}