Skip to main content

Statement

Trait Statement 

Source
pub trait Statement {
    // Required method
    fn write(&self, b: &mut CodeBuffer, level: usize);

    // Provided method
    fn to_code(&self) -> String { ... }
}
Expand description

Code that spans one or more lines.

Required Methods§

Source

fn write(&self, b: &mut CodeBuffer, level: usize)

Writes the code to the buffer b at the indent level.

Provided Methods§

Source

fn to_code(&self) -> String

Renders the statement to a string at indent level 0.

Implementors§