pub struct Finding {
pub path: RepoPath,
pub line: Option<usize>,
pub severity: Severity,
pub criterion: String,
pub message: String,
pub rule_line: Option<usize>,
}Expand description
One line of the report.
Fields§
§path: RepoPathThe file the finding is on.
line: Option<usize>The line, when one applies.
severity: SeverityError or warning.
criterion: StringThe key of the criterion that the finding breaks, as TLMD_57.
message: StringThe message, ending with the location of its rule in the schema when a schema rule raised it.
rule_line: Option<usize>The line in the schema of the rule that raised it, where the check knows one: what a finding on the schema itself sits on when the schema’s own scaffold fails the rule. The report does not print it.
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn new(
path: RepoPath,
line: Option<usize>,
severity: Severity,
criterion: &str,
message: impl Into<String>,
) -> Finding
pub fn new( path: RepoPath, line: Option<usize>, severity: Severity, criterion: &str, message: impl Into<String>, ) -> Finding
Build a finding that breaks criterion.
Sourcepub fn error(
path: RepoPath,
line: Option<usize>,
criterion: &str,
message: impl Into<String>,
) -> Finding
pub fn error( path: RepoPath, line: Option<usize>, criterion: &str, message: impl Into<String>, ) -> Finding
An error finding.
Sourcepub fn warning(
path: RepoPath,
line: Option<usize>,
criterion: &str,
message: impl Into<String>,
) -> Finding
pub fn warning( path: RepoPath, line: Option<usize>, criterion: &str, message: impl Into<String>, ) -> Finding
A warning finding.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Finding
impl<'de> Deserialize<'de> for Finding
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Finding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Finding, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Finding
Source§impl Ord for Finding
impl Ord for Finding
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Finding
impl PartialOrd for Finding
Source§impl Serialize for Finding
impl Serialize for Finding
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Finding
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