pub struct ValidationReport {
pub errors: Vec<ValidationError>,
pub unreachable: Vec<String>,
}Expand description
What a validation run found.
Fields§
§errors: Vec<ValidationError>Failures, in discovery order.
unreachable: Vec<String>Ids that exist but cannot be reached from the root.
Not an error: the specification tells renderers to buffer components until their parent shows up, so an unreachable component is usually a half-streamed tree rather than a broken one. It is still worth telling a generating model about, so it is reported separately.
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn into_result(self) -> Result<()>
pub fn into_result(self) -> Result<()>
Turns the report into a Result, discarding warnings.
§Errors
Returns Error::Validation when any error was reported.
Sourcepub fn errors(&self) -> ValidationErrors
pub fn errors(&self) -> ValidationErrors
The errors as a ValidationErrors list, for prompting or reporting.
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 Default for ValidationReport
impl Default for ValidationReport
Source§fn default() -> ValidationReport
fn default() -> ValidationReport
Returns the “default value” for a type. Read more
impl Eq for ValidationReport
Source§impl PartialEq for ValidationReport
impl PartialEq for ValidationReport
Source§fn eq(&self, other: &ValidationReport) -> bool
fn eq(&self, other: &ValidationReport) -> bool
Tests for
self and other values to be equal, and is used by ==.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.