pub trait FormatOptions {
    // Required methods
    fn indent_style(&self) -> IndentStyle;
    fn indent_width(&self) -> IndentWidth;
    fn line_width(&self) -> LineWidth;
    fn line_ending(&self) -> LineEnding;
    fn attribute_position(&self) -> AttributePosition;
    fn as_print_options(&self) -> PrinterOptions;
}
Expand description

Options customizing how the source code should be formatted.

Required Methods§

source

fn indent_style(&self) -> IndentStyle

The indent style.

source

fn indent_width(&self) -> IndentWidth

The indent width.

source

fn line_width(&self) -> LineWidth

What’s the max width of a line. Defaults to 80.

source

fn line_ending(&self) -> LineEnding

The type of line ending.

source

fn attribute_position(&self) -> AttributePosition

The attribute position.

source

fn as_print_options(&self) -> PrinterOptions

Derives the print options from the these format options

Implementors§