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§
Sourcefn to_source(&self, buffer: &mut SourceBuffer)
fn to_source(&self, buffer: &mut SourceBuffer)
Writes the source code representation of this type to the provided buffer.
Provided Methods§
Sourcefn to_source_string(&self) -> String
fn to_source_string(&self) -> String
Converts this type to a source code string.