pub struct ValidationResult {
pub warnings: Vec<ValidationWarning>,
pub errors: Vec<ValidationError>,
}Expand description
The combined result of validating a document.
Fields§
§warnings: Vec<ValidationWarning>Non-fatal warnings (processing may continue).
errors: Vec<ValidationError>Validation errors (document is non-conformant).
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn into_result(self) -> Result<Vec<ValidationWarning>, ValidationError>
pub fn into_result(self) -> Result<Vec<ValidationWarning>, ValidationError>
Convert to a Result, returning the first error on failure.
If you need all errors, use Self::into_errors instead.
Sourcepub fn into_errors(self) -> Result<Vec<ValidationWarning>, Vec<ValidationError>>
pub fn into_errors(self) -> Result<Vec<ValidationWarning>, Vec<ValidationError>>
Convert to a Result, returning all validation errors on failure.
Prefer this over Self::into_result when you need a complete error
report rather than stopping at the first problem.
§Errors
Returns Err(errors) when one or more validation errors were found.
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
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 ValidationResult
impl Debug for ValidationResult
Source§impl Default for ValidationResult
impl Default for ValidationResult
Source§fn default() -> ValidationResult
fn default() -> ValidationResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnsafeUnpin for ValidationResult
impl UnwindSafe for ValidationResult
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