pub trait FormatCode {
// Required methods
fn format_into_vec_with(
&self,
format: &Format,
out: &mut Vec<String>,
connect: bool,
indent: &str,
);
fn size_hint(&self) -> usize;
// Provided methods
fn format(&self) -> String { ... }
fn format_with(&self, format: &Format) -> String { ... }
fn format_vec_with(&self, format: &Format) -> Vec<String> { ... }
}Expand description
Enable different formatting options for Code structures
Required Methods§
Provided Methods§
Sourcefn format_with(&self, format: &Format) -> String
fn format_with(&self, format: &Format) -> String
Emit self with the format as a string
Sourcefn format_vec_with(&self, format: &Format) -> Vec<String>
fn format_vec_with(&self, format: &Format) -> Vec<String>
Emit self with the format as a vector of lines