pub struct Report {
pub schema_version: u32,
pub subject: String,
pub subject_version: String,
pub producer: Option<String>,
pub started_at: DateTime<Utc>,
pub finished_at: Option<DateTime<Utc>>,
pub checks: Vec<CheckResult>,
}Expand description
A full report. The output of one verification run.
Fields§
§schema_version: u32Schema version for this report format.
subject: StringCrate or project being reported on.
subject_version: StringVersion of the subject at the time of the run.
producer: Option<String>Producer of the report (e.g. dev-bench, dev-async).
started_at: DateTime<Utc>Time the report was started.
finished_at: Option<DateTime<Utc>>Time the report was finalized.
checks: Vec<CheckResult>All individual check results in this report.
Implementations§
Source§impl Report
impl Report
Sourcepub fn new(
subject: impl Into<String>,
subject_version: impl Into<String>,
) -> Self
pub fn new( subject: impl Into<String>, subject_version: impl Into<String>, ) -> Self
Begin a new report for the given subject and version.
Sourcepub fn with_producer(self, producer: impl Into<String>) -> Self
pub fn with_producer(self, producer: impl Into<String>) -> Self
Set the producer of this report.
Sourcepub fn push(&mut self, result: CheckResult)
pub fn push(&mut self, result: CheckResult)
Append a check result to this report.
Sourcepub fn overall_verdict(&self) -> Verdict
pub fn overall_verdict(&self) -> Verdict
Compute the overall verdict for this report.
Rules:
- Any
Fail->Fail - Else any
Warn->Warn - Else any
Pass->Pass - Else (all
Skipor empty) ->Skip
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Report
impl<'de> Deserialize<'de> for Report
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 Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
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