pub struct DiagnosticFormatter<'tu> { /* private fields */ }
Expand description

Builds formatted strings from diagnostics.

Implementations

Sets whether the diagnostic text will be prefixed by the file and line of the source location the diagnostic indicates. This prefix may also contain column and/or source range information.

Sets whether the column will be included in the source location prefix.

Sets whether the source ranges will be included to the source location prefix.

Sets whether the option associated with the diagnostic (e.g., -Wconversion) will be placed in brackets after the diagnostic text if there is such an option.

Sets whether the category number associated with the diagnostic will be placed in brackets after the diagnostic text if there is such a category number.

Sets whether the category name associated with the diagnostic will be placed in brackets after the diagnostic text if there is such a category name.

Returns a formatted string.

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

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.