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.