pub struct CheckResult {
pub name: String,
pub verdict: Verdict,
pub severity: Option<Severity>,
pub detail: Option<String>,
pub at: DateTime<Utc>,
pub duration_ms: Option<u64>,
}Expand description
Result of a single check.
Fields§
§name: StringStable identifier for the check (e.g. compile, test::round_trip).
verdict: VerdictOutcome of the check.
severity: Option<Severity>Severity when the verdict is Fail or Warn. None for Pass and Skip.
detail: Option<String>Human-readable detail. Optional.
at: DateTime<Utc>Time the check ran. UTC.
duration_ms: Option<u64>Duration of the check, in milliseconds. Optional.
Implementations§
Source§impl CheckResult
impl CheckResult
Sourcepub fn fail(name: impl Into<String>, severity: Severity) -> Self
pub fn fail(name: impl Into<String>, severity: Severity) -> Self
Build a failing check result with the given name and severity.
Sourcepub fn warn(name: impl Into<String>, severity: Severity) -> Self
pub fn warn(name: impl Into<String>, severity: Severity) -> Self
Build a warning check result with the given name and severity.
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
Attach a human-readable detail to this check result.
Sourcepub fn with_duration_ms(self, ms: u64) -> Self
pub fn with_duration_ms(self, ms: u64) -> Self
Attach a duration measurement (milliseconds) to this check result.
Trait Implementations§
Source§impl Clone for CheckResult
impl Clone for CheckResult
Source§fn clone(&self) -> CheckResult
fn clone(&self) -> CheckResult
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 CheckResult
impl Debug for CheckResult
Source§impl<'de> Deserialize<'de> for CheckResult
impl<'de> Deserialize<'de> for CheckResult
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 CheckResult
impl RefUnwindSafe for CheckResult
impl Send for CheckResult
impl Sync for CheckResult
impl Unpin for CheckResult
impl UnsafeUnpin for CheckResult
impl UnwindSafe for CheckResult
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