pub struct LintWarning {
pub rule: LintRule,
pub severity: Severity,
pub message: String,
pub path: String,
pub span: Option<Span>,
pub fix: Option<Fix>,
}Expand description
A single lint finding.
Fields§
§rule: LintRuleWhich lint rule fired.
severity: SeverityError or warning.
message: StringHuman-readable message.
path: StringJSON-pointer-style location, e.g. "/status", "/tags/2".
span: Option<Span>Optional source span. None when linting serde_yaml::Value (no
source positions available). Populated by lint_yaml_str which
can resolve paths against the raw text.
fix: Option<Fix>Optional auto-fix. None when the finding cannot be corrected
automatically.
Trait Implementations§
Source§impl Clone for LintWarning
impl Clone for LintWarning
Source§fn clone(&self) -> LintWarning
fn clone(&self) -> LintWarning
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 Debug for LintWarning
impl Debug for LintWarning
Source§impl Display for LintWarning
impl Display for LintWarning
Source§impl PartialEq for LintWarning
impl PartialEq for LintWarning
Source§impl Serialize for LintWarning
impl Serialize for LintWarning
impl Eq for LintWarning
impl StructuralPartialEq for LintWarning
Auto Trait Implementations§
impl Freeze for LintWarning
impl RefUnwindSafe for LintWarning
impl Send for LintWarning
impl Sync for LintWarning
impl Unpin for LintWarning
impl UnsafeUnpin for LintWarning
impl UnwindSafe for LintWarning
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.