Re-exportsΒ§
use std::cell::Cell;πuse std::fs::File;πuse std::io::Error;πuse std::io::ErrorKind;πuse std::io::Read;πuse std::path::Path;πuse std::path::PathBuf;πuse std::env;πuse std::env;πuse std::fs;πuse thiserror::Error;πuse crate::config::config_type::ConfigType;πpub use crate::config::file_lines::FileLines;pub use crate::config::file_lines::FileName;pub use crate::config::file_lines::Range;pub use crate::config::macro_names::MacroSelector;use std::io::Write;πuse serde::Deserialize;πuse serde::Deserialize;πuse serde::Serialize;πuse serde::Serialize;πuse $crate::config::style_edition::StyleEditionDefault;πpub use __define_config_type_on_enum_NewlineStyle::NewlineStyle;pub use __define_config_type_on_enum_BraceStyle::BraceStyle;pub use __define_config_type_on_enum_ControlBraceStyle::ControlBraceStyle;pub use __define_config_type_on_enum_IndentStyle::IndentStyle;pub use __define_config_type_on_enum_Density::Density;pub use __define_config_type_on_enum_TypeDensity::TypeDensity;pub use __define_config_type_on_enum_Heuristics::Heuristics;pub use __define_config_type_on_enum_DocCodeHeuristics::DocCodeHeuristics;pub use __define_config_type_on_enum_GroupImportsTactic::GroupImportsTactic;pub use __define_config_type_on_enum_ImportGranularity::ImportGranularity;pub use __define_config_type_on_enum_HexLiteralCase::HexLiteralCase;pub use __define_config_type_on_enum_FloatLiteralTrailingZero::FloatLiteralTrailingZero;pub use __define_config_type_on_enum_ReportTactic::ReportTactic;pub use __define_config_type_on_enum_EmitMode::EmitMode;pub use __define_config_type_on_enum_Color::Color;pub use __define_config_type_on_enum_Version::Version;pub use __define_config_type_on_enum_Verbosity::Verbosity;pub use __define_config_type_on_enum_Edition::Edition;pub use __define_config_type_on_enum_MatchArmLeadingPipe::MatchArmLeadingPipe;pub use __define_config_type_on_enum_StyleEdition::StyleEdition;
ModulesΒ§
- __
define_ config_ type_ on_ enum_ Brace Style - __
define_ config_ type_ on_ enum_ Color - __
define_ config_ type_ on_ enum_ Control Brace Style - __
define_ config_ type_ on_ enum_ Density - __
define_ config_ type_ on_ enum_ DocCode Heuristics - __
define_ config_ type_ on_ enum_ Edition - __
define_ config_ type_ on_ enum_ Emit Mode - __
define_ config_ type_ on_ enum_ Float Literal Trailing Zero - __
define_ config_ type_ on_ enum_ Group Imports Tactic - __
define_ config_ type_ on_ enum_ Heuristics - __
define_ config_ type_ on_ enum_ HexLiteral Case - __
define_ config_ type_ on_ enum_ Import Granularity - __
define_ config_ type_ on_ enum_ Indent Style - __
define_ config_ type_ on_ enum_ Match ArmLeading Pipe - __
define_ config_ type_ on_ enum_ Newline Style - __
define_ config_ type_ on_ enum_ Report Tactic - __
define_ config_ type_ on_ enum_ Style Edition - __
define_ config_ type_ on_ enum_ Type Density - __
define_ config_ type_ on_ enum_ Verbosity - __
define_ config_ type_ on_ enum_ Version - config_
type π - file_
lines π - This module contains types and functions to support formatting specific line ranges.
- lists π
- Configuration options related to rewriting a list.
- macro_
names π - This module contains types and functions to support formatting specific macros.
- options π
- style_
edition π
MacrosΒ§
- config_
option_ with_ style_ edition_ default - Defines unit structs to implement
StyleEditionDefaultfor.
StructsΒ§
- Array
Width - Attr
FnLike Width - Binop
Separator - Blank
Lines Lower Bound - Blank
Lines Upper Bound - Brace
Style Config - Chain
Width - CliConfig
Setter - CliConfig
WasSet - Color
Config - Combine
Control Expr - Comment
Width - Condense
Wildcard Suffixes - Config
- Config
Setter - Config
WasSet - Control
Brace Style Config - Disable
AllFormatting - DocComment
Code Block Width - DocUse
Small Heuristics - Edition
Config - Emit
Mode Config - Empty
Item Single Line - Enum
Discrim Align Threshold - Error
OnLine Overflow - Error
OnUnformatted - File
Lines Config - Float
Literal Trailing Zero Config - FnArgs
Layout - FnCall
Width - FnParams
Layout - FnSingle
Line - Force
Explicit Abi - Force
Multiline Blocks - Format
Code InDoc Comments - Format
Generated Files - Format
Macro Bodies - Format
Macro Matchers - Format
Strings - Generated
Marker Line Search Limit - Group
Imports Tactic Config - Hard
Tabs - HexLiteral
Case Config - Hide
Parse Errors - Ignore
- Ignore
List - A set of directories, files and modules that rustfmt should ignore.
- Imports
Granularity Config - Imports
Indent - Imports
Layout - Indent
Style Config - Inline
Attribute Width - Make
Backup - Match
ArmBlocks - Match
ArmIndent - Match
ArmLeading Pipe Config - Match
Block Trailing Comma - MaxWidth
- Merge
Derives - Merge
Imports - Newline
Style Config - Normalize
Comments - Normalize
DocAttributes - Overflow
Delimited Expr - Partial
Config - Print
Misformatted File Names - Remove
Nested Parens - Reorder
Impl Items - Reorder
Imports - Reorder
Modules - Required
Version - Short
Array Element Width Threshold - Show
Parse Errors - Single
Line IfElse MaxWidth - Single
Line LetElse MaxWidth - Skip
Children - Skip
Macro Invocations - Space
After Colon - Space
Before Colon - Spaces
Around Ranges - Struct
Field Align Threshold - Struct
LitSingle Line - Struct
LitWidth - Struct
Variant Width - Style
Edition Config - TabSpaces
- ToToml
Error - Trailing
Comma - Trailing
Semicolon - Type
Punctuation Density - Unstable
Features - UseField
Init Shorthand - UseSmall
Heuristics - UseTry
Shorthand - Verbose
- Version
Config - Where
Single Line - Width
Heuristics - Width
Heuristics Config - Wrap
Comments
TraitsΒ§
- CliOptions
- Maps client-supplied options to Rustfmtβs internals, mostly overriding values in a config with values from the command line.
FunctionsΒ§
- check_
semver_ πversion - config_
from_ πuser_ dirs - Looks for a configuration file in the userβs home directory and configuration directory.
- config_
path π - get_
toml_ πpath - load_
config - Loads a config by checking the client-supplied options and if appropriate, the file system (including searching the file system for overrides).
- resolve_
project_ πfile - Looks for a configuration file in the given directory and its parents.