pub struct ValidationResult {
pub is_valid: bool,
pub warnings: Vec<ValidationWarning>,
}Expand description
Result of validating a reading.
Fields§
§is_valid: boolWhether the reading passed validation.
warnings: Vec<ValidationWarning>List of warnings (may be non-empty even if valid).
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn invalid(warnings: Vec<ValidationWarning>) -> Self
pub fn invalid(warnings: Vec<ValidationWarning>) -> Self
Create an invalid result with the given warnings.
Sourcepub fn valid_with_warnings(warnings: Vec<ValidationWarning>) -> Self
pub fn valid_with_warnings(warnings: Vec<ValidationWarning>) -> Self
Create a valid result with warnings.
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Check if there are any warnings.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin 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