pub struct Diagnostic<'tu> { /* private fields */ }
Expand description
A message from the compiler about an issue with a source file.
Implementations§
Source§impl<'tu> Diagnostic<'tu>
impl<'tu> Diagnostic<'tu>
Sourcepub fn get_severity(&self) -> Severity
pub fn get_severity(&self) -> Severity
Returns the severity of this diagnostic.
Sourcepub fn get_location(&self) -> SourceLocation<'tu>
pub fn get_location(&self) -> SourceLocation<'tu>
Returns the source location of this diagnostic.
Sourcepub fn get_ranges(&self) -> Vec<SourceRange<'tu>>
pub fn get_ranges(&self) -> Vec<SourceRange<'tu>>
Returns the source ranges of this diagnostic.
Sourcepub fn get_fix_its(&self) -> Vec<FixIt<'tu>>
pub fn get_fix_its(&self) -> Vec<FixIt<'tu>>
Returns the fix-its for this diagnostic.
Sourcepub fn get_children(&self) -> Vec<Diagnostic<'_>>
pub fn get_children(&self) -> Vec<Diagnostic<'_>>
Returns the child diagnostics of this diagnostic.
Sourcepub fn formatter(&self) -> DiagnosticFormatter<'tu>
pub fn formatter(&self) -> DiagnosticFormatter<'tu>
Returns a diagnostic formatter that builds a formatted string from this diagnostic.
Trait Implementations§
Source§impl<'tu> Clone for Diagnostic<'tu>
impl<'tu> Clone for Diagnostic<'tu>
Source§fn clone(&self) -> Diagnostic<'tu>
fn clone(&self) -> Diagnostic<'tu>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'tu> Debug for Diagnostic<'tu>
impl<'tu> Debug for Diagnostic<'tu>
Source§impl<'tu> Display for Diagnostic<'tu>
impl<'tu> Display for Diagnostic<'tu>
Source§impl<'tu> PartialOrd for Diagnostic<'tu>
Orders by severity.
impl<'tu> PartialOrd for Diagnostic<'tu>
Orders by severity.
impl<'tu> Copy for Diagnostic<'tu>
Auto Trait Implementations§
impl<'tu> Freeze for Diagnostic<'tu>
impl<'tu> RefUnwindSafe for Diagnostic<'tu>
impl<'tu> !Send for Diagnostic<'tu>
impl<'tu> !Sync for Diagnostic<'tu>
impl<'tu> Unpin for Diagnostic<'tu>
impl<'tu> UnwindSafe for Diagnostic<'tu>
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