pub struct FormattingSettings {Show 20 fields
pub indent_style: IndentStyle,
pub space_before_open_block: bool,
pub newline_after_open_block: bool,
pub newline_before_close_block: bool,
pub newline_after_close_block: bool,
pub newline_after_collapsed_statement: bool,
pub newline_before_collapsed_statement: bool,
pub struct_field_separator: Whitespace,
pub struct_declaration_terminator: Whitespace,
pub declaration_terminator: Whitespace,
pub case_label_terminator: Whitespace,
pub spaces_around_binary_ops: bool,
pub statement_terminator: Whitespace,
pub function_definition_terminator: Whitespace,
pub collapse_single_item_compound_statements: bool,
pub space_before_else: bool,
pub space_after_list_separator: bool,
pub space_after_for_statement_separator: bool,
pub spaces_surrounding_initializer_list_expressions: bool,
pub spaces_surrounding_statement_parentheses: bool,
}Expand description
Formatting settings for the GLSL transpiler
Fields§
§indent_style: IndentStyleIndentation style of the output
space_before_open_block: boolInsert a space before block open braces
newline_after_open_block: boolInsert newlines after block open braces
newline_before_close_block: boolInsert newlines before block close braces
newline_after_close_block: boolInsert newline after block close brace
newline_after_collapsed_statement: boolInsert newline after a compound statement collapsed to a simple statement
newline_before_collapsed_statement: boolInsert newline after a compound statement collapsed to a simple statement
struct_field_separator: WhitespaceWhat to insert between fields of a struct
struct_declaration_terminator: WhitespaceWhat to insert after a struct declaration
declaration_terminator: WhitespaceWhat to insert after a declaration
case_label_terminator: WhitespaceWhat to insert after the case label ending colon
spaces_around_binary_ops: boolInsert spaces around binary ops
statement_terminator: WhitespaceWhat to insert after a statement
function_definition_terminator: WhitespaceWhat to insert after a function definition
collapse_single_item_compound_statements: boolWhether to collapse compound statements that contain a single statement to a simple statement or not (i.e., remove braces)
space_before_else: boolInsert a space before the else keyword in an if statement
space_after_list_separator: boolInsert a space after a list separator token (i.e., comma)
space_after_for_statement_separator: boolInsert a space after a for statement separator token (i.e., semicolon)
spaces_surrounding_initializer_list_expressions: boolInsert a space after the { and before the } delimiting a list of initializer expressions
spaces_surrounding_statement_parentheses: boolInsert a space before the ( and after the ) that are part of a statement
Implementations§
Trait Implementations§
Source§impl Clone for FormattingSettings
impl Clone for FormattingSettings
Source§fn clone(&self) -> FormattingSettings
fn clone(&self) -> FormattingSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more