pub struct ValidationReport {
pub entity_counts: BTreeMap<String, usize>,
pub findings: Vec<Finding>,
pub losses: Vec<LossNote>,
}Expand description
Entity counts, findings, and propagated decode losses for one document.
Fields§
§entity_counts: BTreeMap<String, usize>Count of entities per arena, keyed by entity kind (sorted).
findings: Vec<Finding>Findings, in discovery order.
losses: Vec<LossNote>Loss notes supplied to validation.
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Number of findings at or above Severity::Error.
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Number of findings at exactly Severity::Warning.
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
True when there are no Severity::Error/Severity::Blocking findings.
Trait Implementations§
Source§impl Clone for ValidationReport
impl Clone for ValidationReport
Source§fn clone(&self) -> ValidationReport
fn clone(&self) -> ValidationReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValidationReport
impl Debug for ValidationReport
Source§impl<'de> Deserialize<'de> for ValidationReport
impl<'de> Deserialize<'de> for ValidationReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ValidationReport
impl JsonSchema for ValidationReport
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ValidationReport
impl PartialEq for ValidationReport
Source§impl Serialize for ValidationReport
impl Serialize for ValidationReport
impl StructuralPartialEq for ValidationReport
Auto Trait Implementations§
impl Freeze for ValidationReport
impl RefUnwindSafe for ValidationReport
impl Send for ValidationReport
impl Sync for ValidationReport
impl Unpin for ValidationReport
impl UnsafeUnpin for ValidationReport
impl UnwindSafe for ValidationReport
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