Skip to main content

Expression

Trait Expression 

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

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

Code within a single line.

Required Methods§

Source

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

Writes the code to the buffer b.

Provided Methods§

Source

fn to_code(&self) -> String

Renders the expression to a string.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§