Struct nyar_error::Diagnostic
source · pub struct Diagnostic { /* private fields */ }Expand description
A type representing a diagnostic that is ready to be written to output.
Implementations§
source§impl Diagnostic
impl Diagnostic
sourcepub fn write<W>(&self, cache: &FileCache, w: W) -> Result<(), Error>where
W: Write,
pub fn write<W>(&self, cache: &FileCache, w: W) -> Result<(), Error>where
W: Write,
Write this diagnostic to an implementor of Write.
If using the concolor feature, this method assumes that the output is ultimately going to be printed to
stderr. If you are printing to stdout, use the write_for_stdout method instead.
If you wish to write to stderr or stdout, you can do so via Diagnostic::eprint or Diagnostic::print respectively.
source§impl Diagnostic
impl Diagnostic
sourcepub fn new<R>(kind: R) -> DiagnosticBuilderwhere
R: ReportLevel + 'static,
pub fn new<R>(kind: R) -> DiagnosticBuilderwhere
R: ReportLevel + 'static,
Begin building a new Diagnostic.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Diagnostic
impl !Send for Diagnostic
impl !Sync for Diagnostic
impl Unpin for Diagnostic
impl !UnwindSafe for Diagnostic
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more