pub struct SimpleDiagnostic<'a> { /* private fields */ }Expand description
Represents a simplified, serializable diagnostic message.
It mimics the Diagnostic object but omits some redundant fields and keeps all line numbers 1-based instead of zero-based.
Implementations§
Source§impl<'a> SimpleDiagnostic<'a>
impl<'a> SimpleDiagnostic<'a>
Sourcepub fn is_suppressed(&self) -> bool
pub fn is_suppressed(&self) -> bool
Whether --suppress matched this violation, in which case it must not fail the run.
Sourcepub fn severity(&self) -> BlockSeverity
pub fn severity(&self) -> BlockSeverity
The severity, which the caller uses to decide the process exit code.
Sourcepub fn range(&self) -> &'a ViolationRange
pub fn range(&self) -> &'a ViolationRange
Where to underline in the file.
Sourcepub fn address(&self) -> Option<&'a ViolationAddress>
pub fn address(&self) -> Option<&'a ViolationAddress>
The address --suppress may point at, or None when the block has no name.
Trait Implementations§
Source§impl<'a> Debug for SimpleDiagnostic<'a>
impl<'a> Debug for SimpleDiagnostic<'a>
Auto Trait Implementations§
impl<'a> Freeze for SimpleDiagnostic<'a>
impl<'a> RefUnwindSafe for SimpleDiagnostic<'a>
impl<'a> Send for SimpleDiagnostic<'a>
impl<'a> Sync for SimpleDiagnostic<'a>
impl<'a> Unpin for SimpleDiagnostic<'a>
impl<'a> UnsafeUnpin for SimpleDiagnostic<'a>
impl<'a> UnwindSafe for SimpleDiagnostic<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more