pub struct ValidationResult {
pub passed: bool,
pub total_checks: usize,
pub passed_checks: usize,
pub failed_checks: usize,
pub warnings: Vec<ValidationWarning>,
pub errors: Vec<ValidationError>,
pub breaking_changes: Vec<BreakingChange>,
}Expand description
Result of contract validation with detailed breakdown
Fields§
§passed: boolWhether all validation checks passed
total_checks: usizeTotal number of validation checks performed
passed_checks: usizeNumber of checks that passed
failed_checks: usizeNumber of checks that failed
warnings: Vec<ValidationWarning>Non-blocking warnings encountered during validation
errors: Vec<ValidationError>Validation errors that prevent the contract from being valid
breaking_changes: Vec<BreakingChange>Breaking changes detected compared to previous contract version
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn add_error(&mut self, error: ValidationError)
pub fn add_error(&mut self, error: ValidationError)
Add a validation error (marks result as failed)
Sourcepub fn add_warning(&mut self, warning: ValidationWarning)
pub fn add_warning(&mut self, warning: ValidationWarning)
Add a validation warning (does not fail the result)
Sourcepub fn add_breaking_change(&mut self, change: BreakingChange)
pub fn add_breaking_change(&mut self, change: BreakingChange)
Add a breaking change (marks result as failed)
Sourcepub fn add_success(&mut self)
pub fn add_success(&mut self)
Record a successful validation check
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 moreSource§impl Debug for ValidationResult
impl Debug for ValidationResult
Source§impl Default for ValidationResult
impl Default for ValidationResult
Source§impl<'de> Deserialize<'de> for ValidationResult
impl<'de> Deserialize<'de> for ValidationResult
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
Auto 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