PartialConfig in rustfmt_nightly::config - Rust
Description: API documentation for the Rust `PartialConfig` struct in crate `rustfmt_nightly`.

Skip to main content

## PartialConfig

# Struct PartialConfig

Source

    pub struct PartialConfig {Show 89 fields
        pub max_width: Option<<MaxWidth as StyleEditionDefault>::ConfigType>,
        pub hard_tabs: Option<<HardTabs as StyleEditionDefault>::ConfigType>,
        pub tab_spaces: Option<<TabSpaces as StyleEditionDefault>::ConfigType>,
        pub newline_style: Option<<NewlineStyleConfig as StyleEditionDefault>::ConfigType>,
        pub indent_style: Option<<IndentStyleConfig as StyleEditionDefault>::ConfigType>,
        pub use_small_heuristics: Option<<UseSmallHeuristics as StyleEditionDefault>::ConfigType>,
        pub width_heuristics: Option<<WidthHeuristicsConfig as StyleEditionDefault>::ConfigType>,
        pub fn_call_width: Option<<FnCallWidth as StyleEditionDefault>::ConfigType>,
        pub attr_fn_like_width: Option<<AttrFnLikeWidth as StyleEditionDefault>::ConfigType>,
        pub struct_lit_width: Option<<StructLitWidth as StyleEditionDefault>::ConfigType>,
        pub struct_variant_width: Option<<StructVariantWidth as StyleEditionDefault>::ConfigType>,
        pub array_width: Option<<ArrayWidth as StyleEditionDefault>::ConfigType>,
        pub chain_width: Option<<ChainWidth as StyleEditionDefault>::ConfigType>,
        pub single_line_if_else_max_width: Option<<SingleLineIfElseMaxWidth as StyleEditionDefault>::ConfigType>,
        pub single_line_let_else_max_width: Option<<SingleLineLetElseMaxWidth as StyleEditionDefault>::ConfigType>,
        pub wrap_comments: Option<<WrapComments as StyleEditionDefault>::ConfigType>,
        pub format_code_in_doc_comments: Option<<FormatCodeInDocComments as StyleEditionDefault>::ConfigType>,
        pub doc_comment_code_block_width: Option<<DocCommentCodeBlockWidth as StyleEditionDefault>::ConfigType>,
        pub comment_width: Option<<CommentWidth as StyleEditionDefault>::ConfigType>,
        pub normalize_comments: Option<<NormalizeComments as StyleEditionDefault>::ConfigType>,
        pub normalize_doc_attributes: Option<<NormalizeDocAttributes as StyleEditionDefault>::ConfigType>,
        pub format_strings: Option<<FormatStrings as StyleEditionDefault>::ConfigType>,
        pub format_macro_matchers: Option<<FormatMacroMatchers as StyleEditionDefault>::ConfigType>,
        pub format_macro_bodies: Option<<FormatMacroBodies as StyleEditionDefault>::ConfigType>,
        pub skip_macro_invocations: Option<<SkipMacroInvocations as StyleEditionDefault>::ConfigType>,
        pub hex_literal_case: Option<<HexLiteralCaseConfig as StyleEditionDefault>::ConfigType>,
        pub float_literal_trailing_zero: Option<<FloatLiteralTrailingZeroConfig as StyleEditionDefault>::ConfigType>,
        pub empty_item_single_line: Option<<EmptyItemSingleLine as StyleEditionDefault>::ConfigType>,
        pub struct_lit_single_line: Option<<StructLitSingleLine as StyleEditionDefault>::ConfigType>,
        pub fn_single_line: Option<<FnSingleLine as StyleEditionDefault>::ConfigType>,
        pub where_single_line: Option<<WhereSingleLine as StyleEditionDefault>::ConfigType>,
        pub imports_indent: Option<<ImportsIndent as StyleEditionDefault>::ConfigType>,
        pub imports_layout: Option<<ImportsLayout as StyleEditionDefault>::ConfigType>,
        pub imports_granularity: Option<<ImportsGranularityConfig as StyleEditionDefault>::ConfigType>,
        pub group_imports: Option<<GroupImportsTacticConfig as StyleEditionDefault>::ConfigType>,
        pub merge_imports: Option<<MergeImports as StyleEditionDefault>::ConfigType>,
        pub reorder_imports: Option<<ReorderImports as StyleEditionDefault>::ConfigType>,
        pub reorder_modules: Option<<ReorderModules as StyleEditionDefault>::ConfigType>,
        pub reorder_impl_items: Option<<ReorderImplItems as StyleEditionDefault>::ConfigType>,
        pub type_punctuation_density: Option<<TypePunctuationDensity as StyleEditionDefault>::ConfigType>,
        pub space_before_colon: Option<<SpaceBeforeColon as StyleEditionDefault>::ConfigType>,
        pub space_after_colon: Option<<SpaceAfterColon as StyleEditionDefault>::ConfigType>,
        pub spaces_around_ranges: Option<<SpacesAroundRanges as StyleEditionDefault>::ConfigType>,
        pub binop_separator: Option<<BinopSeparator as StyleEditionDefault>::ConfigType>,
        pub remove_nested_parens: Option<<RemoveNestedParens as StyleEditionDefault>::ConfigType>,
        pub combine_control_expr: Option<<CombineControlExpr as StyleEditionDefault>::ConfigType>,
        pub short_array_element_width_threshold: Option<<ShortArrayElementWidthThreshold as StyleEditionDefault>::ConfigType>,
        pub overflow_delimited_expr: Option<<OverflowDelimitedExpr as StyleEditionDefault>::ConfigType>,
        pub struct_field_align_threshold: Option<<StructFieldAlignThreshold as StyleEditionDefault>::ConfigType>,
        pub enum_discrim_align_threshold: Option<<EnumDiscrimAlignThreshold as StyleEditionDefault>::ConfigType>,
        pub match_arm_blocks: Option<<MatchArmBlocks as StyleEditionDefault>::ConfigType>,
        pub match_arm_leading_pipes: Option<<MatchArmLeadingPipeConfig as StyleEditionDefault>::ConfigType>,
        pub match_arm_indent: Option<<MatchArmIndent as StyleEditionDefault>::ConfigType>,
        pub force_multiline_blocks: Option<<ForceMultilineBlocks as StyleEditionDefault>::ConfigType>,
        pub fn_args_layout: Option<<FnArgsLayout as StyleEditionDefault>::ConfigType>,
        pub fn_params_layout: Option<<FnParamsLayout as StyleEditionDefault>::ConfigType>,
        pub brace_style: Option<<BraceStyleConfig as StyleEditionDefault>::ConfigType>,
        pub control_brace_style: Option<<ControlBraceStyleConfig as StyleEditionDefault>::ConfigType>,
        pub trailing_semicolon: Option<<TrailingSemicolon as StyleEditionDefault>::ConfigType>,
        pub trailing_comma: Option<<TrailingComma as StyleEditionDefault>::ConfigType>,
        pub match_block_trailing_comma: Option<<MatchBlockTrailingComma as StyleEditionDefault>::ConfigType>,
        pub blank_lines_upper_bound: Option<<BlankLinesUpperBound as StyleEditionDefault>::ConfigType>,
        pub blank_lines_lower_bound: Option<<BlankLinesLowerBound as StyleEditionDefault>::ConfigType>,
        pub edition: Option<<EditionConfig as StyleEditionDefault>::ConfigType>,
        pub style_edition: Option<<StyleEditionConfig as StyleEditionDefault>::ConfigType>,
        pub version: Option<<VersionConfig as StyleEditionDefault>::ConfigType>,
        pub inline_attribute_width: Option<<InlineAttributeWidth as StyleEditionDefault>::ConfigType>,
        pub format_generated_files: Option<<FormatGeneratedFiles as StyleEditionDefault>::ConfigType>,
        pub generated_marker_line_search_limit: Option<<GeneratedMarkerLineSearchLimit as StyleEditionDefault>::ConfigType>,
        pub merge_derives: Option<<MergeDerives as StyleEditionDefault>::ConfigType>,
        pub use_try_shorthand: Option<<UseTryShorthand as StyleEditionDefault>::ConfigType>,
        pub use_field_init_shorthand: Option<<UseFieldInitShorthand as StyleEditionDefault>::ConfigType>,
        pub force_explicit_abi: Option<<ForceExplicitAbi as StyleEditionDefault>::ConfigType>,
        pub condense_wildcard_suffixes: Option<<CondenseWildcardSuffixes as StyleEditionDefault>::ConfigType>,
        pub color: Option<<ColorConfig as StyleEditionDefault>::ConfigType>,
        pub required_version: Option<<RequiredVersion as StyleEditionDefault>::ConfigType>,
        pub unstable_features: Option<<UnstableFeatures as StyleEditionDefault>::ConfigType>,
        pub disable_all_formatting: Option<<DisableAllFormatting as StyleEditionDefault>::ConfigType>,
        pub skip_children: Option<<SkipChildren as StyleEditionDefault>::ConfigType>,
        pub hide_parse_errors: Option<<HideParseErrors as StyleEditionDefault>::ConfigType>,
        pub show_parse_errors: Option<<ShowParseErrors as StyleEditionDefault>::ConfigType>,
        pub error_on_line_overflow: Option<<ErrorOnLineOverflow as StyleEditionDefault>::ConfigType>,
        pub error_on_unformatted: Option<<ErrorOnUnformatted as StyleEditionDefault>::ConfigType>,
        pub ignore: Option<<Ignore as StyleEditionDefault>::ConfigType>,
        pub verbose: Option<<Verbose as StyleEditionDefault>::ConfigType>,
        pub file_lines: Option<<FileLinesConfig as StyleEditionDefault>::ConfigType>,
        pub emit_mode: Option<<EmitModeConfig as StyleEditionDefault>::ConfigType>,
        pub make_backup: Option<<MakeBackup as StyleEditionDefault>::ConfigType>,
        pub print_misformatted_file_names: Option<<PrintMisformattedFileNames as StyleEditionDefault>::ConfigType>,
    }

## Fields§

§`max_width: Option<<MaxWidth as StyleEditionDefault>::ConfigType>`§`hard_tabs: Option<<HardTabs as StyleEditionDefault>::ConfigType>`§`tab_spaces: Option<<TabSpaces as StyleEditionDefault>::ConfigType>`§`newline_style: Option<<NewlineStyleConfig as StyleEditionDefault>::ConfigType>`§`indent_style: Option<<IndentStyleConfig as StyleEditionDefault>::ConfigType>`§`use_small_heuristics: Option<<UseSmallHeuristics as StyleEditionDefault>::ConfigType>`§`width_heuristics: Option<<WidthHeuristicsConfig as StyleEditionDefault>::ConfigType>`§`fn_call_width: Option<<FnCallWidth as StyleEditionDefault>::ConfigType>`§`attr_fn_like_width: Option<<AttrFnLikeWidth as StyleEditionDefault>::ConfigType>`§`struct_lit_width: Option<<StructLitWidth as StyleEditionDefault>::ConfigType>`§`struct_variant_width: Option<<StructVariantWidth as StyleEditionDefault>::ConfigType>`§`array_width: Option<<ArrayWidth as StyleEditionDefault>::ConfigType>`§`chain_width: Option<<ChainWidth as StyleEditionDefault>::ConfigType>`§`single_line_if_else_max_width: Option<<SingleLineIfElseMaxWidth as StyleEditionDefault>::ConfigType>`§`single_line_let_else_max_width: Option<<SingleLineLetElseMaxWidth as StyleEditionDefault>::ConfigType>`§`wrap_comments: Option<<WrapComments as StyleEditionDefault>::ConfigType>`§`format_code_in_doc_comments: Option<<FormatCodeInDocComments as StyleEditionDefault>::ConfigType>`§`doc_comment_code_block_width: Option<<DocCommentCodeBlockWidth as StyleEditionDefault>::ConfigType>`§`comment_width: Option<<CommentWidth as StyleEditionDefault>::ConfigType>`§`normalize_comments: Option<<NormalizeComments as StyleEditionDefault>::ConfigType>`§`normalize_doc_attributes: Option<<NormalizeDocAttributes as StyleEditionDefault>::ConfigType>`§`format_strings: Option<<FormatStrings as StyleEditionDefault>::ConfigType>`§`format_macro_matchers: Option<<FormatMacroMatchers as StyleEditionDefault>::ConfigType>`§`format_macro_bodies: Option<<FormatMacroBodies as StyleEditionDefault>::ConfigType>`§`skip_macro_invocations: Option<<SkipMacroInvocations as StyleEditionDefault>::ConfigType>`§`hex_literal_case: Option<<HexLiteralCaseConfig as StyleEditionDefault>::ConfigType>`§`float_literal_trailing_zero: Option<<FloatLiteralTrailingZeroConfig as StyleEditionDefault>::ConfigType>`§`empty_item_single_line: Option<<EmptyItemSingleLine as StyleEditionDefault>::ConfigType>`§`struct_lit_single_line: Option<<StructLitSingleLine as StyleEditionDefault>::ConfigType>`§`fn_single_line: Option<<FnSingleLine as StyleEditionDefault>::ConfigType>`§`where_single_line: Option<<WhereSingleLine as StyleEditionDefault>::ConfigType>`§`imports_indent: Option<<ImportsIndent as StyleEditionDefault>::ConfigType>`§`imports_layout: Option<<ImportsLayout as StyleEditionDefault>::ConfigType>`§`imports_granularity: Option<<ImportsGranularityConfig as StyleEditionDefault>::ConfigType>`§`group_imports: Option<<GroupImportsTacticConfig as StyleEditionDefault>::ConfigType>`§`merge_imports: Option<<MergeImports as StyleEditionDefault>::ConfigType>`§`reorder_imports: Option<<ReorderImports as StyleEditionDefault>::ConfigType>`§`reorder_modules: Option<<ReorderModules as StyleEditionDefault>::ConfigType>`§`reorder_impl_items: Option<<ReorderImplItems as StyleEditionDefault>::ConfigType>`§`type_punctuation_density: Option<<TypePunctuationDensity as StyleEditionDefault>::ConfigType>`§`space_before_colon: Option<<SpaceBeforeColon as StyleEditionDefault>::ConfigType>`§`space_after_colon: Option<<SpaceAfterColon as StyleEditionDefault>::ConfigType>`§`spaces_around_ranges: Option<<SpacesAroundRanges as StyleEditionDefault>::ConfigType>`§`binop_separator: Option<<BinopSeparator as StyleEditionDefault>::ConfigType>`§`remove_nested_parens: Option<<RemoveNestedParens as StyleEditionDefault>::ConfigType>`§`combine_control_expr: Option<<CombineControlExpr as StyleEditionDefault>::ConfigType>`§`short_array_element_width_threshold: Option<<ShortArrayElementWidthThreshold as StyleEditionDefault>::ConfigType>`§`overflow_delimited_expr: Option<<OverflowDelimitedExpr as StyleEditionDefault>::ConfigType>`§`struct_field_align_threshold: Option<<StructFieldAlignThreshold as StyleEditionDefault>::ConfigType>`§`enum_discrim_align_threshold: Option<<EnumDiscrimAlignThreshold as StyleEditionDefault>::ConfigType>`§`match_arm_blocks: Option<<MatchArmBlocks as StyleEditionDefault>::ConfigType>`§`match_arm_leading_pipes: Option<<MatchArmLeadingPipeConfig as StyleEditionDefault>::ConfigType>`§`match_arm_indent: Option<<MatchArmIndent as StyleEditionDefault>::ConfigType>`§`force_multiline_blocks: Option<<ForceMultilineBlocks as StyleEditionDefault>::ConfigType>`§`fn_args_layout: Option<<FnArgsLayout as StyleEditionDefault>::ConfigType>`§`fn_params_layout: Option<<FnParamsLayout as StyleEditionDefault>::ConfigType>`§`brace_style: Option<<BraceStyleConfig as StyleEditionDefault>::ConfigType>`§`control_brace_style: Option<<ControlBraceStyleConfig as StyleEditionDefault>::ConfigType>`§`trailing_semicolon: Option<<TrailingSemicolon as StyleEditionDefault>::ConfigType>`§`trailing_comma: Option<<TrailingComma as StyleEditionDefault>::ConfigType>`§`match_block_trailing_comma: Option<<MatchBlockTrailingComma as StyleEditionDefault>::ConfigType>`§`blank_lines_upper_bound: Option<<BlankLinesUpperBound as StyleEditionDefault>::ConfigType>`§`blank_lines_lower_bound: Option<<BlankLinesLowerBound as StyleEditionDefault>::ConfigType>`§`edition: Option<<EditionConfig as StyleEditionDefault>::ConfigType>`§`style_edition: Option<<StyleEditionConfig as StyleEditionDefault>::ConfigType>`§`version: Option<<VersionConfig as StyleEditionDefault>::ConfigType>`§`inline_attribute_width: Option<<InlineAttributeWidth as StyleEditionDefault>::ConfigType>`§`format_generated_files: Option<<FormatGeneratedFiles as StyleEditionDefault>::ConfigType>`§`generated_marker_line_search_limit: Option<<GeneratedMarkerLineSearchLimit as StyleEditionDefault>::ConfigType>`§`merge_derives: Option<<MergeDerives as StyleEditionDefault>::ConfigType>`§`use_try_shorthand: Option<<UseTryShorthand as StyleEditionDefault>::ConfigType>`§`use_field_init_shorthand: Option<<UseFieldInitShorthand as StyleEditionDefault>::ConfigType>`§`force_explicit_abi: Option<<ForceExplicitAbi as StyleEditionDefault>::ConfigType>`§`condense_wildcard_suffixes: Option<<CondenseWildcardSuffixes as StyleEditionDefault>::ConfigType>`§`color: Option<<ColorConfig as StyleEditionDefault>::ConfigType>`§`required_version: Option<<RequiredVersion as StyleEditionDefault>::ConfigType>`§`unstable_features: Option<<UnstableFeatures as StyleEditionDefault>::ConfigType>`§`disable_all_formatting: Option<<DisableAllFormatting as StyleEditionDefault>::ConfigType>`§`skip_children: Option<<SkipChildren as StyleEditionDefault>::ConfigType>`§`hide_parse_errors: Option<<HideParseErrors as StyleEditionDefault>::ConfigType>`§`show_parse_errors: Option<<ShowParseErrors as StyleEditionDefault>::ConfigType>`§`error_on_line_overflow: Option<<ErrorOnLineOverflow as StyleEditionDefault>::ConfigType>`§`error_on_unformatted: Option<<ErrorOnUnformatted as StyleEditionDefault>::ConfigType>`§`ignore: Option<<Ignore as StyleEditionDefault>::ConfigType>`§`verbose: Option<<Verbose as StyleEditionDefault>::ConfigType>`§`file_lines: Option<<FileLinesConfig as StyleEditionDefault>::ConfigType>`§`emit_mode: Option<<EmitModeConfig as StyleEditionDefault>::ConfigType>`§`make_backup: Option<<MakeBackup as StyleEditionDefault>::ConfigType>`§`print_misformatted_file_names: Option<<PrintMisformattedFileNames as StyleEditionDefault>::ConfigType>`

## Implementations§

Source§

### impl PartialConfig

Source

#### pub fn to_toml(&self) -> Result<String, ToTomlError>

Source

#### pub(crate) fn to_parsed_config( self, style_edition_override: Option<StyleEdition>, edition_override: Option<Edition>, version_override: Option<Version>, dir: &Path, ) -> Config

## Trait Implementations§

Source§

### impl Clone for PartialConfig

Source§

#### fn clone(&self) -> PartialConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from `source`. Read more
Source§

### impl<'de> Deserialize<'de> for PartialConfig

Source§

#### fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

### impl Serialize for PartialConfig

Source§

#### fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

## Auto Trait Implementations§

§

### impl Freeze for PartialConfig

§

### impl RefUnwindSafe for PartialConfig

§

### impl Send for PartialConfig

§

### impl Sync for PartialConfig

§

### impl Unpin for PartialConfig

§

### impl UnsafeUnpin for PartialConfig

§

### impl UnwindSafe for PartialConfig

## Blanket Implementations§

Source§

### impl<T> Any for T
where T: 'static + ?Sized,

Source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
Source§

### impl<T> Borrow<T> for T
where T: ?Sized,

Source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

### impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

### impl<T> CloneToUninit for T
where T: Clone,

Source§

#### unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (`clone_to_uninit`)
Performs copy-assignment from `self` to `dest`. Read more
Source§

### impl<T> From<T> for T

Source§

#### fn from(t: T) -> T

Returns the argument unchanged.

§

### impl<T> Instrument for T

§

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [`Span`], returning an `Instrumented` wrapper. Read more
§

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
Source§

### impl<T, U> Into<U> for T
where U: From<T>,

Source§

#### fn into(self) -> U

Calls `U::from(self)`.

That is, this conversion is whatever the implementation of `From<T> for U` chooses to do.

Source§

### impl<T> IntoEither for T

Source§

#### fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left` is `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
Source§

#### fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left(&self)` returns `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
§

### impl<T> Pointable for T

§

#### const ALIGN: usize

The alignment of pointer.
§

#### type Init = T

The type for initializers.
§

#### unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

#### unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

#### unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

#### unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

### impl<T> ToOwned for T
where T: Clone,

Source§

#### type Owned = T

The resulting type after obtaining ownership.
Source§

#### fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

#### fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

### impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

#### type Error = Infallible

The type returned in the event of a conversion error.
Source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

### impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

### impl<T> WithSubscriber for T

§

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
Source§

### impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

## Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain `repr(...)` attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 632 bytes