#[non_exhaustive]pub struct StylesheetReport {
pub name: String,
pub version: String,
pub sha256: String,
pub svrl: String,
pub findings: Vec<Finding>,
pub warnings: Vec<String>,
pub failure: Option<StylesheetFailure>,
/* private fields */
}Expand description
What one stylesheet of the rule set reported on a document.
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.name: StringThe stylesheet, by its name in the bundle.
version: StringThe version of the rule set it implements.
sha256: StringThe SHA-256 of the stylesheet that ran.
svrl: StringThe SVRL report, exactly as the stylesheet wrote it.
findings: Vec<Finding>Its failed asserts and successful reports, in report order.
warnings: Vec<String>Recoverable conditions the transformation reported (ambiguous rule matches, dynamic errors raised while matching a pattern, after which the rule did not match), as the reference engine reports them: each distinct message once.
failure: Option<StylesheetFailure>The dynamic error that stopped the stylesheet, if it did not finish: then
svrl is empty and there are no findings. This only happens in a report with
schema errors (see Validator::validate_with).
Implementations§
Source§impl StylesheetReport
impl StylesheetReport
Sourcepub fn canonical_svrl(&self) -> Result<String, Error>
pub fn canonical_svrl(&self) -> Result<String, Error>
The SVRL report in the canonical text form of the einvoice-svrl crate (version
1), in which the document’s URI is written {document}: the form the expected
results of the reference engine are stored in.
§Errors
Error::Transform when the stylesheet did not finish (there is no report);
Error::Internal when the report holds something the canonical form cannot
represent.