Struct flycatcher_diagnostic::DiagnosticEmitter[][src]

pub struct DiagnosticEmitter<'a> {
    pub config: Config,
    pub filename: &'a str,
    pub source: &'a str,
}
Expand description

A tool for emitting diagnostic messages to the terminal.

Fields

config: Config

The configuration used for displaying diagnostic messages. The default is similar to the way RustC displays diagnostic messages.

filename: &'a str

The name of the file that the diagnostic messages should say. If you don’t know what to use here, just use @anonymous.

source: &'a str

The source of the file, used by diagnostic messages to provide a snippet of the offending code.

Implementations

Allocates a new DiagnosticEmitter that will emit diagnostic messages with the file path provided.

Arguments

  • filename: This is the filename that will be displayed in the diagnostic messages when they are emitted to the console.
  • source: The contents of the file that the diagnostics are for.

Emits a single diagnostic message to the console.

Arguments

  • diagnostic: The diagnostic message to display.

Emits a list of diagnostics to the terminal.

Arguments

  • diagnostics: The vector of diagnostics to log to the console.

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

Performs the conversion.

Performs the conversion.

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.