pub struct Check {
pub constraint: Constraint,
pub rule_id: &'static str,
pub name: &'static str,
pub message: &'static str,
pub description: &'static str,
pub severity: &'static str,
}Expand description
One constraint together with how to report it.
SHACL attaches sh:message, sh:name and sh:severity to the constraint,
not to the property shape, and one property shape routinely carries several
constraints with different messages — a cardinality rule and a value-range
rule on the same path. Pairing them here keeps the reported text the one the
schema wrote for that specific check.
Fields§
§constraint: Constraint§rule_id: &'static strShape IRI, the stable machine-readable rule id a caller can silence.
name: &'static str§message: &'static str§description: &'static str§severity: &'static str"sh:Violation", "sh:Warning" or "sh:Info". NC leans on sh:Info
far more than CGMES does — 842 occurrences against 7 — so a caller that
treats every violation as a failure will report an NC dataset as broken
when it is merely being advised.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Check
impl Freeze for Check
impl Move for Check
impl RefUnwindSafe for Check
impl Send for Check
impl Sync for Check
impl Unpin for Check
impl UnsafeUnpin for Check
impl UnwindSafe for Check
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