pub struct ValidationIssue {
pub severity: Severity,
pub path: PathBuf,
pub message: String,
pub line: Option<usize>,
pub rule: String,
}Expand description
A single validation issue found in an ADR.
Fields§
§severity: SeveritySeverity of the issue.
path: PathBufPath to the ADR file.
message: StringHuman-readable description of the issue.
line: Option<usize>Optional line number where the issue was found.
rule: StringName of the rule that produced this issue.
Implementations§
Source§impl ValidationIssue
impl ValidationIssue
Sourcepub fn new(
severity: Severity,
path: PathBuf,
message: impl Into<String>,
rule: impl Into<String>,
) -> Self
pub fn new( severity: Severity, path: PathBuf, message: impl Into<String>, rule: impl Into<String>, ) -> Self
Creates a new validation issue.
Sourcepub fn error(
path: PathBuf,
message: impl Into<String>,
rule: impl Into<String>,
) -> Self
pub fn error( path: PathBuf, message: impl Into<String>, rule: impl Into<String>, ) -> Self
Creates an error issue.
Trait Implementations§
Source§impl Clone for ValidationIssue
impl Clone for ValidationIssue
Source§fn clone(&self) -> ValidationIssue
fn clone(&self) -> ValidationIssue
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 ValidationIssue
impl Debug for ValidationIssue
Auto Trait Implementations§
impl Freeze for ValidationIssue
impl RefUnwindSafe for ValidationIssue
impl Send for ValidationIssue
impl Sync for ValidationIssue
impl Unpin for ValidationIssue
impl UnwindSafe for ValidationIssue
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