pub struct Finding {
pub rule: String,
pub severity: Severity,
pub path: String,
pub line: usize,
pub message: String,
pub fix: Option<Fix>,
pub candidates: Vec<String>,
}Fields§
§rule: String§severity: Severity§path: String§line: usize§message: String§fix: Option<Fix>§candidates: Vec<String>Implementations§
Source§impl Finding
impl Finding
pub fn new( rule: impl Into<String>, severity: Severity, path: impl Into<String>, line: usize, message: impl Into<String>, ) -> Self
pub fn error( rule: impl Into<String>, path: impl Into<String>, line: usize, message: impl Into<String>, ) -> Self
pub fn warn( rule: impl Into<String>, path: impl Into<String>, line: usize, message: impl Into<String>, ) -> Self
pub fn fix_cmd(self, cmd: impl Into<String>) -> Self
pub fn fix_replace(self, from: impl Into<String>, to: impl Into<String>) -> Self
pub fn with_candidates(self, c: Vec<String>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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<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