Struct biome_suppression::SuppressionDiagnostic
source · pub struct SuppressionDiagnostic { /* private fields */ }
Trait Implementations§
source§impl Clone for SuppressionDiagnostic
impl Clone for SuppressionDiagnostic
source§fn clone(&self) -> SuppressionDiagnostic
fn clone(&self) -> SuppressionDiagnostic
Returns a copy 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 Debug for SuppressionDiagnostic
impl Debug for SuppressionDiagnostic
source§impl Diagnostic for SuppressionDiagnostic
impl Diagnostic for SuppressionDiagnostic
source§fn category(&self) -> Option<&'static Category>
fn category(&self) -> Option<&'static Category>
The category of a diagnostic uniquely identifying this
diagnostic type, such as
lint/correctness/noArguments
, args/invalid
or format/disabled
.source§fn description(&self, fmt: &mut Formatter<'_>) -> Result
fn description(&self, fmt: &mut Formatter<'_>) -> Result
The description is a text-only explanation of the issue this diagnostic
is reporting, intended for display contexts that do not support rich
markup such as in-editor popovers Read more
source§fn message(&self, fmt: &mut Formatter<'_>) -> Result<()>
fn message(&self, fmt: &mut Formatter<'_>) -> Result<()>
An explanation of the issue this diagnostic is reporting Read more
source§fn location(&self) -> Location<'_>
fn location(&self) -> Location<'_>
A diagnostic can be tied to a specific “location”: this can be a file,
memory buffer, command line argument, etc. It may also be tied to a
specific text range within the content of that location. Finally, it
may also provide the source string for that location (this is required
in order to display a code frame advice for the diagnostic).
source§fn severity(&self) -> Severity
fn severity(&self) -> Severity
The severity defines whether this diagnostic reports an error, a
warning, an information or a hint to the user.
source§fn advices(&self, visitor: &mut dyn Visit) -> Result<(), Error>
fn advices(&self, visitor: &mut dyn Visit) -> Result<(), Error>
Advices are the main building blocks used compose rich errors. They are
implemented using a visitor pattern, where consumers of a diagnostic
can visit the object and collect the advices that make it up for the
purpose of display or introspection.
source§fn verbose_advices(&self, visitor: &mut dyn Visit) -> Result<(), Error>
fn verbose_advices(&self, visitor: &mut dyn Visit) -> Result<(), Error>
Diagnostics can defines additional advices to be printed if the user
requires more detail about the diagnostic.
Tags convey additional boolean metadata about the nature of a diagnostic: Read more
source§fn source(&self) -> Option<&dyn Diagnostic>
fn source(&self) -> Option<&dyn Diagnostic>
Similarly to the
source
method of the std::error::Error trait, this
returns another diagnostic that’s the logical “cause” for this issue.
For instance, a “request failed” diagnostic may have been cause by a
“deserialization error”. This allows low-level error to be wrapped in
higher level concepts, while retaining enough information to display
and fix the underlying issue.source§impl PartialEq for SuppressionDiagnostic
impl PartialEq for SuppressionDiagnostic
source§fn eq(&self, other: &SuppressionDiagnostic) -> bool
fn eq(&self, other: &SuppressionDiagnostic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SuppressionDiagnostic
impl StructuralPartialEq for SuppressionDiagnostic
Auto Trait Implementations§
impl Freeze for SuppressionDiagnostic
impl RefUnwindSafe for SuppressionDiagnostic
impl Send for SuppressionDiagnostic
impl Sync for SuppressionDiagnostic
impl Unpin for SuppressionDiagnostic
impl UnwindSafe for SuppressionDiagnostic
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<E> DiagnosticExt for Ewhere
E: AsDiagnostic,
impl<E> DiagnosticExt for Ewhere
E: AsDiagnostic,
source§fn context<M>(self, message: M) -> Error
fn context<M>(self, message: M) -> Error
Returns a new diagnostic with the provided
message
as a message and
description, and self
as a source diagnostic. This is useful to
create chains of diagnostics, where high level errors wrap lower level
causes.source§fn with_category(self, category: &'static Category) -> Error
fn with_category(self, category: &'static Category) -> Error
Returns a new diagnostic using the provided
category
if self
doesn’t already have one.source§fn with_file_path(self, path: impl AsResource) -> Error
fn with_file_path(self, path: impl AsResource) -> Error
Returns a new diagnostic using the provided
path
if self
doesn’t already have one.source§fn with_file_span(self, span: impl AsSpan) -> Error
fn with_file_span(self, span: impl AsSpan) -> Error
Returns a new diagnostic using the provided
span
instead of the one in self
.source§fn with_file_source_code(self, source_code: impl AsSourceCode) -> Error
fn with_file_source_code(self, source_code: impl AsSourceCode) -> Error
Returns a new diagnostic using the provided
source_code
if self
doesn’t already have one.Returns a new diagnostic with additional
tags
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.