Struct clang::diagnostic::Diagnostic
source · [−]pub struct Diagnostic<'tu> { /* private fields */ }
Expand description
A message from the compiler about an issue with a source file.
Implementations
sourceimpl<'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
sourceimpl<'tu> Clone for Diagnostic<'tu>
impl<'tu> Clone for Diagnostic<'tu>
sourcefn clone(&self) -> Diagnostic<'tu>
fn clone(&self) -> Diagnostic<'tu>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'tu> Debug for Diagnostic<'tu>
impl<'tu> Debug for Diagnostic<'tu>
sourceimpl<'tu> Display for Diagnostic<'tu>
impl<'tu> Display for Diagnostic<'tu>
sourceimpl<'tu> PartialOrd<Diagnostic<'tu>> for Diagnostic<'tu>
impl<'tu> PartialOrd<Diagnostic<'tu>> for Diagnostic<'tu>
Orders by severity.
sourcefn partial_cmp(&self, other: &Diagnostic<'tu>) -> Option<Ordering>
fn partial_cmp(&self, other: &Diagnostic<'tu>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'tu> Copy for Diagnostic<'tu>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more