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 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,
§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