Struct rustfmt_nightly::config::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Methods
impl Config
[src]
fn verbose(&self) -> bool
fn disable_all_formatting(&self) -> bool
fn skip_children(&self) -> bool
fn file_lines(&self) -> FileLines
fn max_width(&self) -> usize
fn error_on_line_overflow(&self) -> bool
fn tab_spaces(&self) -> usize
fn fn_call_width(&self) -> usize
fn struct_lit_width(&self) -> usize
fn struct_variant_width(&self) -> usize
fn force_explicit_abi(&self) -> bool
fn newline_style(&self) -> NewlineStyle
fn fn_brace_style(&self) -> BraceStyle
fn item_brace_style(&self) -> BraceStyle
fn control_style(&self) -> Style
fn control_brace_style(&self) -> ControlBraceStyle
fn impl_empty_single_line(&self) -> bool
fn trailing_comma(&self) -> SeparatorTactic
fn fn_empty_single_line(&self) -> bool
fn fn_single_line(&self) -> bool
fn fn_return_indent(&self) -> ReturnIndent
fn fn_args_paren_newline(&self) -> bool
fn fn_args_density(&self) -> Density
fn fn_args_layout(&self) -> IndentStyle
fn array_layout(&self) -> IndentStyle
fn array_width(&self) -> usize
fn type_punctuation_density(&self) -> TypeDensity
fn where_style(&self) -> Style
fn where_density(&self) -> Density
fn where_layout(&self) -> ListTactic
fn where_pred_indent(&self) -> IndentStyle
fn generics_indent(&self) -> IndentStyle
fn struct_lit_style(&self) -> IndentStyle
fn struct_lit_multiline_style(&self) -> MultilineStyle
fn fn_call_style(&self) -> IndentStyle
fn report_todo(&self) -> ReportTactic
fn report_fixme(&self) -> ReportTactic
fn chain_indent(&self) -> IndentStyle
fn chain_one_line_max(&self) -> usize
fn chain_split_single_child(&self) -> bool
fn reorder_imports(&self) -> bool
fn reorder_imports_in_group(&self) -> bool
fn reorder_imported_names(&self) -> bool
fn single_line_if_else_max_width(&self) -> usize
fn format_strings(&self) -> bool
fn force_format_strings(&self) -> bool
fn take_source_hints(&self) -> bool
fn hard_tabs(&self) -> bool
fn wrap_comments(&self) -> bool
fn comment_width(&self) -> usize
fn normalize_comments(&self) -> bool
fn wrap_match_arms(&self) -> bool
fn match_block_trailing_comma(&self) -> bool
fn indent_match_arms(&self) -> bool
fn closure_block_indent_threshold(&self) -> isize
fn space_before_type_annotation(&self) -> bool
fn space_after_type_annotation_colon(&self) -> bool
fn space_before_struct_lit_field_colon(&self) -> bool
fn space_after_struct_lit_field_colon(&self) -> bool
fn space_before_bound(&self) -> bool
fn space_after_bound_colon(&self) -> bool
fn spaces_around_ranges(&self) -> bool
fn spaces_within_angle_brackets(&self) -> bool
fn spaces_within_square_brackets(&self) -> bool
fn spaces_within_parens(&self) -> bool
fn use_try_shorthand(&self) -> bool
fn write_mode(&self) -> WriteMode
fn condense_wildcard_suffixes(&self) -> bool
fn combine_control_expr(&self) -> bool
fn set<'a>(&'a mut self) -> ConfigSetter<'a>
fn was_set<'a>(&'a self) -> ConfigWasSet<'a>
fn from_toml(toml: &str) -> Result<Config, String>
fn used_options(&self) -> PartialConfig
fn all_options(&self) -> PartialConfig
fn override_value(&mut self, key: &str, val: &str)
fn from_toml_path(file_path: &Path) -> Result<Config, Error>
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>
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()
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