Skip to main content

ToSource

Trait ToSource 

Source
pub trait ToSource {
    // Required method
    fn to_source(&self, buffer: &mut SourceBuffer);

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

A trait for types that can be converted to source code.

Required Methods§

Source

fn to_source(&self, buffer: &mut SourceBuffer)

Writes the source code representation of this type to the provided buffer.

Provided Methods§

Source

fn to_source_string(&self) -> String

Converts this type to a source code string.

Implementors§