Struct rustfmt::config::Config [] [src]

pub struct Config {
    pub verbose: bool,
    pub skip_children: bool,
    pub max_width: usize,
    pub ideal_width: usize,
    pub tab_spaces: usize,
    pub fn_call_width: usize,
    pub struct_lit_width: usize,
    pub newline_style: NewlineStyle,
    pub fn_brace_style: BraceStyle,
    pub item_brace_style: BraceStyle,
    pub impl_empty_single_line: bool,
    pub fn_empty_single_line: bool,
    pub fn_single_line: bool,
    pub fn_return_indent: ReturnIndent,
    pub fn_args_paren_newline: bool,
    pub fn_args_density: Density,
    pub fn_args_layout: FnArgLayoutStyle,
    pub fn_arg_indent: BlockIndentStyle,
    pub type_punctuation_density: TypeDensity,
    pub where_density: Density,
    pub where_indent: BlockIndentStyle,
    pub where_layout: ListTactic,
    pub where_pred_indent: BlockIndentStyle,
    pub where_trailing_comma: bool,
    pub generics_indent: BlockIndentStyle,
    pub struct_trailing_comma: SeparatorTactic,
    pub struct_lit_trailing_comma: SeparatorTactic,
    pub struct_lit_style: StructLitStyle,
    pub struct_lit_multiline_style: MultilineStyle,
    pub enum_trailing_comma: bool,
    pub report_todo: ReportTactic,
    pub report_fixme: ReportTactic,
    pub chain_base_indent: BlockIndentStyle,
    pub chain_indent: BlockIndentStyle,
    pub reorder_imports: bool,
    pub single_line_if_else: bool,
    pub format_strings: bool,
    pub force_format_strings: bool,
    pub chains_overflow_last: bool,
    pub take_source_hints: bool,
    pub hard_tabs: bool,
    pub wrap_comments: bool,
    pub normalise_comments: bool,
    pub wrap_match_arms: bool,
    pub match_block_trailing_comma: bool,
    pub match_wildcard_trailing_comma: bool,
    pub write_mode: WriteMode,
}

Fields

verbose: bool skip_children: bool max_width: usize ideal_width: usize tab_spaces: usize fn_call_width: usize struct_lit_width: usize newline_style: NewlineStyle fn_brace_style: BraceStyle item_brace_style: BraceStyle impl_empty_single_line: bool fn_empty_single_line: bool fn_single_line: bool fn_return_indent: ReturnIndent fn_args_paren_newline: bool fn_args_density: Density fn_args_layout: FnArgLayoutStyle fn_arg_indent: BlockIndentStyle type_punctuation_density: TypeDensity where_density: Density where_indent: BlockIndentStyle where_layout: ListTactic where_pred_indent: BlockIndentStyle where_trailing_comma: bool generics_indent: BlockIndentStyle struct_trailing_comma: SeparatorTactic struct_lit_trailing_comma: SeparatorTactic struct_lit_style: StructLitStyle struct_lit_multiline_style: MultilineStyle enum_trailing_comma: bool report_todo: ReportTactic report_fixme: ReportTactic chain_base_indent: BlockIndentStyle chain_indent: BlockIndentStyle reorder_imports: bool single_line_if_else: bool format_strings: bool force_format_strings: bool chains_overflow_last: bool take_source_hints: bool hard_tabs: bool wrap_comments: bool normalise_comments: bool wrap_match_arms: bool match_block_trailing_comma: bool match_wildcard_trailing_comma: bool write_mode: WriteMode

Methods

impl Config
[src]

fn from_toml(toml: &str) -> Config

fn override_value(&mut self, key: &str, val: &str)

fn print_docs()

Trait Implementations

impl Clone for Config
[src]

fn clone(&self) -> Config

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Decodable for Config
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Config, __D::Error>

impl Default for Config
[src]

fn default() -> Config

Returns the "default value" for a type. Read more