pub struct Config {
    pub display_style: DisplayStyle,
    pub tab_width: usize,
    pub styles: Styles,
    pub chars: Chars,
    pub start_context_lines: usize,
    pub end_context_lines: usize,
}
Expand description

Configures how a diagnostic is rendered.

Fields

display_style: DisplayStyle

The display style to use when rendering diagnostics. Defaults to: DisplayStyle::Rich.

tab_width: usize

Column width of tabs. Defaults to: 4.

styles: Styles

Styles to use when rendering the diagnostic.

chars: Chars

Characters to use when rendering the diagnostic.

start_context_lines: usize

The minimum number of lines to be shown after the line on which a multiline Label begins.

Defaults to: 3.

end_context_lines: usize

The minimum number of lines to be shown before the line on which a multiline Label ends.

Defaults to: 1.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.