pub struct Finding {
pub severity: Severity,
pub rule: String,
pub path: Path,
pub message: String,
}Expand description
One thing a validator has to say about a file.
Fields§
§severity: SeverityHow serious it is.
rule: StringA stable identifier for the check that produced this, e.g.
structure.reference.dangling or where.IfcRoot.WR1. Callers filter
and suppress on this, so it is part of the contract.
path: PathWhere the problem is.
message: StringWhat is wrong, in one sentence, without restating the rule id.
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn error(
rule: impl Into<String>,
path: Path,
message: impl Into<String>,
) -> Self
pub fn error( rule: impl Into<String>, path: Path, message: impl Into<String>, ) -> Self
A schema violation.
Sourcepub fn warning(
rule: impl Into<String>,
path: Path,
message: impl Into<String>,
) -> Self
pub fn warning( rule: impl Into<String>, path: Path, message: impl Into<String>, ) -> Self
A legal but suspicious condition.
Trait Implementations§
impl Eq for Finding
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