#[non_exhaustive]pub struct Report {
pub rule_set: RuleSetVersion,
pub document_uri: Option<String>,
pub scenario: Option<String>,
pub no_scenario: Option<NoScenario>,
pub schema_errors: Vec<SchemaError>,
pub stylesheets: Vec<StylesheetReport>,
}Expand description
The result of validating one document: the schema errors, then what each stylesheet of the rule set reported.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule_set: RuleSetVersionThe rule set used.
document_uri: Option<String>The URI the document was given, if any (document-uri(/) in the stylesheets).
scenario: Option<String>The name of the scenario of the rule set the document matched, whose severities
apply to its findings and, in a rule set that selects by scenario, whose
stylesheets ran (RuleSet::scenarios), if any.
no_scenario: Option<NoScenario>In a rule set that selects by scenario, why the document has none, if it has none: it is then invalid, no stylesheet ran on it and no schema error is reported (the KoSIT validator validates a document against the schema of its scenario).
schema_errors: Vec<SchemaError>The schema validity errors, sorted by position; empty when the document is valid against the schema, or when the rule set has no schema.
stylesheets: Vec<StylesheetReport>One report per stylesheet that ran, in the order they ran: every stylesheet of the rule set, or those of the scenario the document matched in a rule set that selects by scenario.
Implementations§
Source§impl Report
impl Report
Sourcepub fn verdict(&self) -> Verdict
pub fn verdict(&self) -> Verdict
Verdict::Valid if there is no schema error and no fatal finding, and, in a
rule set that selects by scenario, the document matched one.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether every stylesheet ran to the end (see StylesheetReport::failure).
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Whether the verdict is Verdict::Valid.