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
impl Eq for FormattingSettings
impl StructuralPartialEq for FormattingSettings
Auto Trait Implementations§
impl Freeze for FormattingSettings
impl RefUnwindSafe for FormattingSettings
impl Send for FormattingSettings
impl Sync for FormattingSettings
impl Unpin for FormattingSettings
impl UnwindSafe for FormattingSettings
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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