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
fn try_config( &self, ctx: &mut FormatterContext, config: FormatterConfig, ) -> FormattedLines
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".