Struct sane_fmt::rules::cfg::ConfigurationBuilder [−][src]
TypeScript formatting configuration builder.
Example
use dprint_plugin_typescript::configuration::*; let config = ConfigurationBuilder::new() .line_width(80) .prefer_hanging(true) .prefer_single_line(false) .quote_style(QuoteStyle::PreferSingle) .next_control_flow_position(NextControlFlowPosition::SameLine) .build();
Implementations
impl ConfigurationBuilder
[src]
pub fn new() -> ConfigurationBuilder
[src]
Constructs a new configuration builder.
pub fn build(&self) -> Configuration
[src]
Gets the final configuration that can be used to format a file.
pub fn global_config(
&mut self,
global_config: GlobalConfiguration
) -> &mut ConfigurationBuilder
[src]
&mut self,
global_config: GlobalConfiguration
) -> &mut ConfigurationBuilder
Set the global configuration.
pub fn deno(&mut self) -> &mut ConfigurationBuilder
[src]
Helper method to set the configuration to what’s used for Deno.
pub fn line_width(&mut self, value: u32) -> &mut ConfigurationBuilder
[src]
The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases.
Default: 120
pub fn use_tabs(&mut self, value: bool) -> &mut ConfigurationBuilder
[src]
Whether to use tabs (true) or spaces (false).
Default: false
pub fn indent_width(&mut self, value: u8) -> &mut ConfigurationBuilder
[src]
The number of columns for an indent.
Default: 4
pub fn new_line_kind(&mut self, value: NewLineKind) -> &mut ConfigurationBuilder
[src]
The kind of newline to use.
Default: NewLineKind::LineFeed
pub fn quote_style(&mut self, value: QuoteStyle) -> &mut ConfigurationBuilder
[src]
The quote style to use.
Default: QuoteStyle::AlwaysDouble
pub fn semi_colons(&mut self, value: SemiColons) -> &mut ConfigurationBuilder
[src]
Whether statements should end in a semi-colon.
Default: SemiColons::Prefer
pub fn prefer_hanging(&mut self, value: bool) -> &mut ConfigurationBuilder
[src]
Set to prefer hanging indentation when exceeding the line width.
Default: false
pub fn brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
Where to place the opening brace.
Default: BracePosition::SameLineUnlessHanging
pub fn next_control_flow_position(
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
Where to place the next control flow within a control flow statement.
Default: NextControlFlowPosition::NextLine
pub fn operator_position(
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
Where to place the operator for expressions that span multiple lines.
Default: OperatorPosition::NextLine
pub fn single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
Where to place the expression of a statement that could possibly be on one line (ex. if (true) console.log(5);
).
Default: SingleBodyPosition::Maintain
pub fn trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
If trailing commas should be used.
Default: TrailingCommas::OnlyMultiLine
pub fn use_braces(&mut self, value: UseBraces) -> &mut ConfigurationBuilder
[src]
If braces should be used or not.
Default: UseBraces::WhenNotSingleLine
pub fn prefer_single_line(&mut self, value: bool) -> &mut ConfigurationBuilder
[src]
If code should revert back from being on multiple lines to being on a single line when able.
Default: false
pub fn binary_expression_space_surrounding_bitwise_and_arithmetic_operator(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to surround bitwise and arithmetic operators in a binary expression with spaces.
true
(default) - Ex.1 + 2
false
- Ex.1+2
pub fn comment_line_force_space_after_slashes(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Forces a space after the double slash in a comment line.
true
(default) - Ex. //test
-> // test
false
- Ex. //test
-> //test
pub fn construct_signature_space_after_new_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the new
keyword in a construct signature.
true
- Ex. new (): MyClass;
false
(default) - Ex. new(): MyClass;
pub fn constructor_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a constructor.
true
- Ex. constructor ()
false
(false) - Ex. constructor()
pub fn constructor_type_space_after_new_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the new
keyword in a constructor type.
true
- Ex. type MyClassCtor = new () => MyClass;
false
(default) - Ex. type MyClassCtor = new() => MyClass;
pub fn do_while_statement_space_after_while_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the while
keyword in a do while statement.
true
(true) - Ex. do {\n} while (condition);
false
- Ex. do {\n} while(condition);
pub fn export_declaration_space_surrounding_named_exports(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add spaces around named exports in an export declaration.
true
(default) - Ex.export { SomeExport, OtherExport };
false
- Ex.export {SomeExport, OtherExport};
pub fn for_statement_space_after_for_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the for
keyword in a “for” statement.
true
(default) - Ex.for (let i = 0; i < 5; i++)
false
- Ex.for(let i = 0; i < 5; i++)
pub fn for_statement_space_after_semi_colons(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the semi-colons in a “for” statement.
true
(default) - Ex.for (let i = 0; i < 5; i++)
false
- Ex.for (let i = 0;i < 5;i++)
pub fn for_in_statement_space_after_for_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the for
keyword in a “for in” statement.
true
(default) - Ex.for (const prop in obj)
false
- Ex.for(const prop in obj)
pub fn for_of_statement_space_after_for_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the for
keyword in a “for of” statement.
true
(default) - Ex.for (const value of myArray)
false
- Ex.for(const value of myArray)
pub fn function_declaration_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a function declaration.
true
- Ex.function myFunction ()
false
(default) - Ex.function myFunction()
pub fn function_expression_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a function expression.
true
- Ex. function<T> ()
false
(default) - Ex. function<T> ()
pub fn function_expression_space_after_function_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the function keyword of a function expression.
true
- Ex. function <T>()
.
false
(default) - Ex. function<T>()
pub fn get_accessor_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a get accessor.
true
- Ex. get myProp ()
false
(false) - Ex. get myProp()
pub fn if_statement_space_after_if_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the if
keyword in an “if” statement.
true
(default) - Ex. if (true)
false
- Ex. if(true)
pub fn import_declaration_space_surrounding_named_imports(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add spaces around named imports in an import declaration.
true
(default) - Ex.import { SomeExport, OtherExport } from "my-module";
false
- Ex.import {SomeExport, OtherExport} from "my-module";
pub fn jsx_expression_container_space_surrounding_expression(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space surrounding the expression of a JSX container.
true
- Ex.{ myValue }
false
(default) - Ex.{myValue}
pub fn object_expression_space_surrounding_properties(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space surrounding the properties of an object expression.
true
(default) - Ex.{ key: value }
false
- Ex.{key: value}
pub fn object_pattern_space_surrounding_properties(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space surrounding the properties of an object pattern.
true
(default) - Ex.{ key: value } = obj
false
- Ex.{key: value} = obj
pub fn method_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a method.
true
- Ex. myMethod ()
false
- Ex. myMethod()
pub fn set_accessor_space_before_parentheses(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the parentheses of a set accessor.
true
- Ex. set myProp (value: string)
false
(default) - Ex. set myProp(value: string)
pub fn space_surrounding_properties(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space surrounding the properties of object-like nodes.
true
(default) - Ex.{ key: value }
false
- Ex.{key: value}
pub fn tagged_template_space_before_literal(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the literal in a tagged template.
true
(default) - Ex.html \
`` false
- Ex.html\
``
pub fn type_annotation_space_before_colon(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the colon of a type annotation.
true
- Ex.function myFunction() : string
false
(default) - Ex.function myFunction(): string
pub fn type_assertion_space_before_expression(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space before the expression in a type assertion.
true
(default) - Ex.<string> myValue
false
- Ex.<string>myValue
pub fn type_literal_space_surrounding_properties(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space surrounding the properties of a type literal.
true
(default) - Ex.value: { key: Type }
false
- Ex.value: {key: Type}
pub fn while_statement_space_after_while_keyword(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to add a space after the while
keyword in a while statement.
true
(default) - Ex.while (true)
false
- Ex.while(true)
pub fn arrow_function_use_parentheses(
&mut self,
value: UseParentheses
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseParentheses
) -> &mut ConfigurationBuilder
Whether to use parentheses for arrow functions.
Default: UseParentheses::Maintain
pub fn binary_expression_line_per_expression(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to force a line per expression when spanning multiple lines.
true
- Formats with each part on a new line.false
(default) - Maintains the line breaks as written by the programmer.
pub fn member_expression_line_per_expression(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Whether to force a line per expression when spanning multiple lines.
true
- Formats with each part on a new line.false
(default) - Maintains the line breaks as written by the programmer.
pub fn type_literal_separator_kind(
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
The kind of separator to use in type literals.
pub fn type_literal_separator_kind_single_line(
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
The kind of separator to use in type literals when single line.
pub fn type_literal_separator_kind_multi_line(
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SemiColonOrComma
) -> &mut ConfigurationBuilder
The kind of separator to use in type literals when multi-line.
pub fn module_sort_import_declarations(
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
Alphabetically sorts the import declarations based on their module specifiers.
Default: Case insensitive
pub fn module_sort_export_declarations(
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
Alphabetically sorts the export declarations based on their module specifiers.
Default: Case insensitive
pub fn import_declaration_sort_named_imports(
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
Alphabetically sorts the import declaration’s named imports.
Default: Case insensitive
pub fn export_declaration_sort_named_exports(
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SortOrder
) -> &mut ConfigurationBuilder
Alphabetically sorts the export declaration’s named exports.
Default: Case insensitive
pub fn ignore_node_comment_text(
&mut self,
value: &str
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: &str
) -> &mut ConfigurationBuilder
The text to use for an ignore comment (ex. // dprint-ignore
).
Default: "dprint-ignore"
pub fn ignore_file_comment_text(
&mut self,
value: &str
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: &str
) -> &mut ConfigurationBuilder
The text to use for a file ignore comment (ex. // dprint-ignore-file
).
Default: "dprint-ignore-file"
pub fn arrow_function_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn class_declaration_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn class_expression_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn constructor_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn do_while_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn enum_declaration_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn for_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn for_in_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn for_of_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn get_accessor_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn if_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn interface_declaration_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn function_declaration_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn function_expression_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn method_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn module_declaration_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn set_accessor_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn switch_case_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn switch_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn try_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn while_statement_brace_position(
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: BracePosition
) -> &mut ConfigurationBuilder
pub fn arguments_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn array_expression_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn array_pattern_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn do_while_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn export_declaration_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn extends_clause_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn for_in_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn for_of_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn for_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn if_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn implements_clause_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn import_declaration_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn jsx_attributes_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn object_expression_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn object_pattern_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn parameters_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn sequence_expression_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn switch_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn tuple_type_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn type_literal_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn type_parameters_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn union_and_intersection_type_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn variable_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn while_statement_prefer_hanging(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn enum_declaration_member_spacing(
&mut self,
value: MemberSpacing
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: MemberSpacing
) -> &mut ConfigurationBuilder
pub fn if_statement_next_control_flow_position(
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
pub fn try_statement_next_control_flow_position(
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: NextControlFlowPosition
) -> &mut ConfigurationBuilder
pub fn binary_expression_operator_position(
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
pub fn conditional_expression_operator_position(
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: OperatorPosition
) -> &mut ConfigurationBuilder
pub fn if_statement_single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
pub fn for_statement_single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
pub fn for_in_statement_single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
pub fn for_of_statement_single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
pub fn while_statement_single_body_position(
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: SingleBodyPosition
) -> &mut ConfigurationBuilder
pub fn arguments_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn parameters_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn array_expression_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn array_pattern_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn enum_declaration_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn export_declaration_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn import_declaration_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn object_expression_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn object_pattern_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn tuple_type_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn type_literal_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
Only applies when using commas on type literals.
pub fn type_parameters_trailing_commas(
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: TrailingCommas
) -> &mut ConfigurationBuilder
pub fn if_statement_use_braces(
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
pub fn for_statement_use_braces(
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
pub fn for_in_statement_use_braces(
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
pub fn for_of_statement_use_braces(
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
pub fn while_statement_use_braces(
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: UseBraces
) -> &mut ConfigurationBuilder
pub fn array_expression_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn array_pattern_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn arguments_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn binary_expression_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn computed_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn conditional_expression_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn conditional_type_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn decorators_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn export_declaration_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn for_statement_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn import_declaration_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn jsx_attributes_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn jsx_element_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn mapped_type_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn member_expression_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn object_expression_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn object_pattern_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn parameters_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn parentheses_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn tuple_type_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn type_literal_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn type_parameters_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn union_and_intersection_type_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
pub fn variable_statement_prefer_single_line(
&mut self,
value: bool
) -> &mut ConfigurationBuilder
[src]
&mut self,
value: bool
) -> &mut ConfigurationBuilder
Auto Trait Implementations
impl RefUnwindSafe for ConfigurationBuilder
impl Send for ConfigurationBuilder
impl Sync for ConfigurationBuilder
impl Unpin for ConfigurationBuilder
impl UnwindSafe for ConfigurationBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Conv for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Node for T where
T: Any + ?Sized,
T: Any + ?Sized,
impl<X> Pipe for X
[src]
pub fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
[src]
Function: FnOnce(Self) -> Return,
pub fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
[src]
Function: FnOnce(&'a Self) -> Return,
pub fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
[src]
Function: FnOnce(&'a mut Self) -> Return,
impl<X> Pipe for X
[src]
pub fn pipe<Return, Function>(self, f: Function) -> Return where
Function: FnOnce(Self) -> Return,
[src]
Function: FnOnce(Self) -> Return,
pub fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return where
Function: FnOnce(&'a Self) -> Return,
[src]
Function: FnOnce(&'a Self) -> Return,
pub fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return where
Function: FnOnce(&'a mut Self) -> Return,
[src]
Function: FnOnce(&'a mut Self) -> Return,
pub fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
[src]
Self: AsRef<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
pub fn pipe_as_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
[src]
&'a mut self,
f: Function
) -> Return where
Self: AsMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
pub fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
[src]
Self: Deref<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
pub fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
[src]
&'a mut self,
f: Function
) -> Return where
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
pub fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return where
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
[src]
Self: Borrow<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a Param) -> Return,
pub fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
[src]
&'a mut self,
f: Function
) -> Return where
Self: BorrowMut<Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
impl<T> Pipe for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
[src]
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
[src]
R: 'a,
pub fn pipe_ref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
[src]
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
pub fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
[src]
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
[src]
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
[src]
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_as_mut<'a, U, R>(
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
[src]
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
[src]
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
pub fn pipe_deref_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
[src]
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
impl<T> Send for T where
T: ?Sized,
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
T: ?Sized,
impl<T> Tap for T
[src]
pub fn tap(self, func: impl FnOnce(&Self)) -> Self
[src]
pub fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self
[src]
pub fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
[src]
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
[src]
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
[src]
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
[src]
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
[src]
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
[src]
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
pub fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
[src]
pub fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
[src]
pub fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
[src]
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
[src]
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
[src]
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
[src]
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
[src]
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
[src]
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
impl<T> TryConv for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,