pub trait Formattable {
// Required method
fn format(&self, ctx: &mut FormatterContext) -> FormattedLines;
// Provided methods
fn line_length_aware_format(
&self,
ctx: &mut FormatterContext,
) -> FormattedLines { ... }
fn try_config(
&self,
ctx: &mut FormatterContext,
config: FormatterConfig,
) -> FormattedLines { ... }
}
Required Methods§
fn format(&self, ctx: &mut FormatterContext) -> FormattedLines
Provided Methods§
Sourcefn line_length_aware_format(&self, ctx: &mut FormatterContext) -> FormattedLines
fn line_length_aware_format(&self, ctx: &mut FormatterContext) -> FormattedLines
the below is the actual entry point to the interface, which attempts to reformat the item with more things broken up across lines if the line length exceeds the limit