Struct rustfmt_nightly::config::Config
[−]
[src]
pub struct Config {
pub license_template: Option<Regex>,
// some fields omitted
}Fields
license_template: Option<Regex>
Methods
impl Config[src]
pub fn version_meets_requirement(&self, error_summary: &mut Summary) -> bool[src]
pub fn max_width(&self) -> usize[src]
pub fn hard_tabs(&self) -> bool[src]
pub fn tab_spaces(&self) -> usize[src]
pub fn newline_style(&self) -> NewlineStyle[src]
pub fn indent_style(&self) -> IndentStyle[src]
pub fn use_small_heuristics(&self) -> bool[src]
pub fn format_strings(&self) -> bool[src]
pub fn wrap_comments(&self) -> bool[src]
pub fn comment_width(&self) -> usize[src]
pub fn normalize_comments(&self) -> bool[src]
pub fn license_template_path(&self) -> String[src]
pub fn empty_item_single_line(&self) -> bool[src]
pub fn struct_lit_single_line(&self) -> bool[src]
pub fn fn_single_line(&self) -> bool[src]
pub fn where_single_line(&self) -> bool[src]
pub fn imports_indent(&self) -> IndentStyle[src]
pub fn imports_layout(&self) -> ListTactic[src]
pub fn reorder_extern_crates(&self) -> bool[src]
pub fn reorder_extern_crates_in_group(&self) -> bool[src]
pub fn reorder_imports(&self) -> bool[src]
pub fn reorder_imports_in_group(&self) -> bool[src]
pub fn reorder_imported_names(&self) -> bool[src]
pub fn reorder_modules(&self) -> bool[src]
pub fn binop_separator(&self) -> SeparatorPlace[src]
pub fn type_punctuation_density(&self) -> TypeDensity[src]
pub fn space_before_colon(&self) -> bool[src]
pub fn space_after_colon(&self) -> bool[src]
pub fn spaces_around_ranges(&self) -> bool[src]
pub fn spaces_within_parens_and_brackets(&self) -> bool[src]
pub fn combine_control_expr(&self) -> bool[src]
pub fn struct_field_align_threshold(&self) -> usize[src]
pub fn remove_blank_lines_at_start_or_end_of_block(&self) -> bool[src]
pub fn match_arm_blocks(&self) -> bool[src]
pub fn force_multiline_blocks(&self) -> bool[src]
pub fn fn_args_density(&self) -> Density[src]
pub fn brace_style(&self) -> BraceStyle[src]
pub fn control_brace_style(&self) -> ControlBraceStyle[src]
pub fn trailing_comma(&self) -> SeparatorTactic[src]
pub fn trailing_semicolon(&self) -> bool[src]
pub fn match_block_trailing_comma(&self) -> bool[src]
pub fn blank_lines_upper_bound(&self) -> usize[src]
pub fn blank_lines_lower_bound(&self) -> usize[src]
pub fn merge_derives(&self) -> bool[src]
pub fn use_try_shorthand(&self) -> bool[src]
pub fn condense_wildcard_suffixes(&self) -> bool[src]
pub fn force_explicit_abi(&self) -> bool[src]
pub fn use_field_init_shorthand(&self) -> bool[src]
pub fn write_mode(&self) -> WriteMode[src]
pub fn color(&self) -> Color[src]
pub fn required_version(&self) -> String[src]
pub fn unstable_features(&self) -> bool[src]
pub fn disable_all_formatting(&self) -> bool[src]
pub fn skip_children(&self) -> bool[src]
pub fn hide_parse_errors(&self) -> bool[src]
pub fn error_on_line_overflow(&self) -> bool[src]
pub fn error_on_unformatted(&self) -> bool[src]
pub fn report_todo(&self) -> ReportTactic[src]
pub fn report_fixme(&self) -> ReportTactic[src]
pub fn ignore(&self) -> IgnoreList[src]
pub fn verbose(&self) -> bool[src]
pub fn file_lines(&self) -> FileLines[src]
pub fn width_heuristics(&self) -> WidthHeuristics[src]
pub fn set<'a>(&'a mut self) -> ConfigSetter<'a>[src]
pub fn was_set<'a>(&'a self) -> ConfigWasSet<'a>[src]
pub fn hash_set() -> HashSet<String>[src]
Returns a hash set initialized with every user-facing config option name.
pub fn is_valid_name(name: &str) -> bool[src]
pub fn from_toml(toml: &str, dir: &Path) -> Result<Config, String>[src]
pub fn used_options(&self) -> PartialConfig[src]
pub fn all_options(&self) -> PartialConfig[src]
pub fn override_value(&mut self, key: &str, val: &str)[src]
pub 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.
pub 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.
[src]
pub 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