Struct glsl_lang::transpiler::glsl::FormattingSettings
source · 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: IndentStyle
Indentation style of the output
space_before_open_block: bool
Insert a space before block open braces
newline_after_open_block: bool
Insert newlines after block open braces
newline_before_close_block: bool
Insert newlines before block close braces
newline_after_close_block: bool
Insert newline after block close brace
newline_after_collapsed_statement: bool
Insert newline after a compound statement collapsed to a simple statement
newline_before_collapsed_statement: bool
Insert newline after a compound statement collapsed to a simple statement
struct_field_separator: Whitespace
What to insert between fields of a struct
struct_declaration_terminator: Whitespace
What to insert after a struct declaration
declaration_terminator: Whitespace
What to insert after a declaration
case_label_terminator: Whitespace
What to insert after the case label ending colon
spaces_around_binary_ops: bool
Insert spaces around binary ops
statement_terminator: Whitespace
What to insert after a statement
function_definition_terminator: Whitespace
What to insert after a function definition
collapse_single_item_compound_statements: bool
Whether to collapse compound statements that contain a single statement to a simple statement or not (i.e., remove braces)
space_before_else: bool
Insert a space before the else keyword in an if statement
space_after_list_separator: bool
Insert a space after a list separator token (i.e., comma)
space_after_for_statement_separator: bool
Insert a space after a for statement separator token (i.e., semicolon)
spaces_surrounding_initializer_list_expressions: bool
Insert a space after the { and before the } delimiting a list of initializer expressions
spaces_surrounding_statement_parentheses: bool
Insert 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 moresource§impl Debug for FormattingSettings
impl Debug for FormattingSettings
source§impl Default for FormattingSettings
impl Default for FormattingSettings
source§impl<'s> From<&'s FormattingSettings> for FormattingState<'s>
impl<'s> From<&'s FormattingSettings> for FormattingState<'s>
source§fn from(settings: &'s FormattingSettings) -> Self
fn from(settings: &'s FormattingSettings) -> Self
source§impl PartialEq for FormattingSettings
impl PartialEq for FormattingSettings
source§fn eq(&self, other: &FormattingSettings) -> bool
fn eq(&self, other: &FormattingSettings) -> bool
self
and other
values to be equal, and is used
by ==
.