pub struct VerificationResult {
pub component_id: String,
pub success: bool,
pub checks: Vec<VerificationCheck>,
}Expand description
Aggregate verification result for a single component.
Contains the component ID, a list of individual checks, and a computed
success field derived from the check statuses:
success: trueif all checks passed or only warnedsuccess: falseif any check failed
Fields§
§component_id: StringComponent that was verified.
success: boolWhether verification succeeded overall.
checks: Vec<VerificationCheck>Individual check results.
Implementations§
Source§impl VerificationResult
impl VerificationResult
Sourcepub fn new(
component_id: impl Into<String>,
checks: Vec<VerificationCheck>,
) -> Self
pub fn new( component_id: impl Into<String>, checks: Vec<VerificationCheck>, ) -> Self
Create a new verification result from individual checks.
The success field is automatically computed:
trueif no check hasCheckStatus::Failedfalseif any check failed
Sourcepub fn fail(component_id: impl Into<String>, reason: impl Into<String>) -> Self
pub fn fail(component_id: impl Into<String>, reason: impl Into<String>) -> Self
Create a failed result with a single check.
Sourcepub fn is_all_passed(&self) -> bool
pub fn is_all_passed(&self) -> bool
Whether all checks passed (no warnings, no failures).
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Whether there are any warnings.
Sourcepub fn check_count(&self) -> usize
pub fn check_count(&self) -> usize
Number of checks.
Trait Implementations§
Source§impl Clone for VerificationResult
impl Clone for VerificationResult
Source§impl Debug for VerificationResult
impl Debug for VerificationResult
Source§impl<'de> Deserialize<'de> for VerificationResult
impl<'de> Deserialize<'de> for VerificationResult
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 PartialEq for VerificationResult
impl PartialEq for VerificationResult
Source§impl Serialize for VerificationResult
impl Serialize for VerificationResult
impl StructuralPartialEq for VerificationResult
Auto Trait Implementations§
impl Freeze for VerificationResult
impl RefUnwindSafe for VerificationResult
impl Send for VerificationResult
impl Sync for VerificationResult
impl Unpin for VerificationResult
impl UnsafeUnpin for VerificationResult
impl UnwindSafe for VerificationResult
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more