Struct glsl_lang::transpiler::glsl::FormattingState[][src]

pub struct FormattingState<'s> {
    pub settings: &'s FormattingSettings,
    // some fields omitted
}

Formatting state of the GLSL transpiler

Fields

settings: &'s FormattingSettings

Formatting settings

Implementations

impl<'s> FormattingState<'s>[src]

pub fn new_line(&mut self, required: bool) -> Result[src]

Append a pending new line to the output

pub fn consume_newline(&mut self)[src]

Consume the pending newlines

pub fn flush_line<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Flush pending newlines to the output, if any

pub fn flush_space<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Flush pending newlines as spaces to the output, if any

pub fn enter_block<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Enter a new block, and update the indentation level

pub fn exit_block<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Exit the current block, and update the indentation level

pub fn write_struct_field_separator<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Write a struct field separator

pub fn write_struct_declaration_terminator<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Write a struct declaration terminator

pub fn write_declaration_terminator<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Write a declaration terminator

pub fn write_binary_op<F>(&self, f: &mut F, op: &str) -> Result where
    F: Write
[src]

Write a binary operator

pub fn write_statement_terminator<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Write a statement terminator

pub fn write_function_definition_terminator<F>(&mut self, f: &mut F) -> Result where
    F: Write
[src]

Write a function definition terminator

Trait Implementations

impl<'s> Clone for FormattingState<'s>[src]

impl<'s> Copy for FormattingState<'s>[src]

impl<'s> Debug for FormattingState<'s>[src]

impl Default for FormattingState<'static>[src]

impl<'s> From<&'s FormattingSettings> for FormattingState<'s>[src]

impl<'s> PartialEq<FormattingState<'s>> for FormattingState<'s>[src]

impl<'s> StructuralPartialEq for FormattingState<'s>[src]

Auto Trait Implementations

impl<'s> RefUnwindSafe for FormattingState<'s>

impl<'s> Send for FormattingState<'s>

impl<'s> Sync for FormattingState<'s>

impl<'s> Unpin for FormattingState<'s>

impl<'s> UnwindSafe for FormattingState<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

type Err = Infallible

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.