Struct rustfmt::config::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Methods
impl Config
[src]
fn verbose(&self) -> bool
[src]
fn disable_all_formatting(&self) -> bool
[src]
fn skip_children(&self) -> bool
[src]
fn file_lines(&self) -> FileLines
[src]
fn max_width(&self) -> usize
[src]
fn error_on_line_overflow(&self) -> bool
[src]
fn tab_spaces(&self) -> usize
[src]
fn fn_call_width(&self) -> usize
[src]
fn struct_lit_width(&self) -> usize
[src]
fn struct_variant_width(&self) -> usize
[src]
fn force_explicit_abi(&self) -> bool
[src]
fn newline_style(&self) -> NewlineStyle
[src]
fn fn_brace_style(&self) -> BraceStyle
[src]
fn item_brace_style(&self) -> BraceStyle
[src]
fn control_style(&self) -> Style
[src]
fn control_brace_style(&self) -> ControlBraceStyle
[src]
fn impl_empty_single_line(&self) -> bool
[src]
fn trailing_comma(&self) -> SeparatorTactic
[src]
fn fn_empty_single_line(&self) -> bool
[src]
fn fn_single_line(&self) -> bool
[src]
fn fn_return_indent(&self) -> ReturnIndent
[src]
fn fn_args_paren_newline(&self) -> bool
[src]
fn fn_args_density(&self) -> Density
[src]
fn fn_args_layout(&self) -> IndentStyle
[src]
fn array_layout(&self) -> IndentStyle
[src]
fn array_width(&self) -> usize
[src]
fn type_punctuation_density(&self) -> TypeDensity
[src]
fn where_style(&self) -> Style
[src]
fn where_density(&self) -> Density
[src]
fn where_layout(&self) -> ListTactic
[src]
fn where_pred_indent(&self) -> IndentStyle
[src]
fn generics_indent(&self) -> IndentStyle
[src]
fn struct_lit_style(&self) -> IndentStyle
[src]
fn struct_lit_multiline_style(&self) -> MultilineStyle
[src]
fn fn_call_style(&self) -> IndentStyle
[src]
fn report_todo(&self) -> ReportTactic
[src]
fn report_fixme(&self) -> ReportTactic
[src]
fn chain_indent(&self) -> IndentStyle
[src]
fn chain_one_line_max(&self) -> usize
[src]
fn chain_split_single_child(&self) -> bool
[src]
fn reorder_imports(&self) -> bool
[src]
fn reorder_imports_in_group(&self) -> bool
[src]
fn reorder_imported_names(&self) -> bool
[src]
fn single_line_if_else_max_width(&self) -> usize
[src]
fn format_strings(&self) -> bool
[src]
fn force_format_strings(&self) -> bool
[src]
fn take_source_hints(&self) -> bool
[src]
fn hard_tabs(&self) -> bool
[src]
fn wrap_comments(&self) -> bool
[src]
fn comment_width(&self) -> usize
[src]
fn normalize_comments(&self) -> bool
[src]
fn wrap_match_arms(&self) -> bool
[src]
fn match_block_trailing_comma(&self) -> bool
[src]
fn indent_match_arms(&self) -> bool
[src]
fn closure_block_indent_threshold(&self) -> isize
[src]
fn space_before_type_annotation(&self) -> bool
[src]
fn space_after_type_annotation_colon(&self) -> bool
[src]
fn space_before_struct_lit_field_colon(&self) -> bool
[src]
fn space_after_struct_lit_field_colon(&self) -> bool
[src]
fn space_before_bound(&self) -> bool
[src]
fn space_after_bound_colon(&self) -> bool
[src]
fn spaces_around_ranges(&self) -> bool
[src]
fn spaces_within_angle_brackets(&self) -> bool
[src]
fn spaces_within_square_brackets(&self) -> bool
[src]
fn spaces_within_parens(&self) -> bool
[src]
fn use_try_shorthand(&self) -> bool
[src]
fn write_mode(&self) -> WriteMode
[src]
fn condense_wildcard_suffixes(&self) -> bool
[src]
fn combine_control_expr(&self) -> bool
[src]
fn set<'a>(&'a mut self) -> ConfigSetter<'a>
[src]
fn from_toml(toml: &str) -> Result<Config, String>
[src]
fn used_options(&self) -> PartialConfig
[src]
fn all_options(&self) -> PartialConfig
[src]
fn override_value(&mut self, key: &str, val: &str)
[src]
fn from_toml_path(file_path: &Path) -> Result<Config, Error>
[src]
Construct a Config
from the toml file specified at file_path
.
This method only looks at the provided path, for a method that
searches parents for a rustfmt.toml
see from_resolved_toml_path
.
Return a Config
if the config could be read and parsed from
the file, Error otherwise.
fn from_resolved_toml_path(
dir: &Path
) -> Result<(Config, Option<PathBuf>), Error>
[src]
dir: &Path
) -> Result<(Config, Option<PathBuf>), Error>
Resolve the config for input in dir
.
Searches for rustfmt.toml
beginning with dir
, and
recursively checking parents of dir
if no config file is found.
If no config file exists in dir
or in any parent, a
default Config
will be returned (and the returned path will be empty).
Returns the Config
to use, and the path of the project file if there was
one.
fn print_docs()
[src]
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more