pub struct Report {
pub source: String,
pub sha256: Option<String>,
pub n_vars: usize,
pub n_cons: usize,
pub point: String,
pub checks: Vec<CheckRecord>,
pub findings: Vec<Finding>,
pub truncated: BTreeMap<&'static str, usize>,
pub max_per_code: usize,
pub tolerances: BTreeMap<&'static str, Number>,
pub sections: BTreeMap<&'static str, Value>,
/* private fields */
}Expand description
The whole report.
Fields§
§source: String§sha256: Option<String>§n_vars: usize§n_cons: usize§point: StringLabel of the point the numerical checks evaluated at.
checks: Vec<CheckRecord>§findings: Vec<Finding>§truncated: BTreeMap<&'static str, usize>Per-code count of findings dropped by the cap.
max_per_code: usize§tolerances: BTreeMap<&'static str, Number>Tolerances used, by name, so a reader can reproduce the run.
sections: BTreeMap<&'static str, Value>Extra structured sections (the embedded check-x0 report, summary statistics), keyed by section name.
Implementations§
Source§impl Report
impl Report
pub fn new( source: String, n_vars: usize, n_cons: usize, max_per_code: usize, ) -> Self
Sourcepub fn ran(&mut self, check: &'static str) -> Sink<'_>
pub fn ran(&mut self, check: &'static str) -> Sink<'_>
Record that check ran and return a sink for its findings.
Record that check could not run, and why.
Sourcepub fn count(&self, sev: Severity) -> usize
pub fn count(&self, sev: Severity) -> usize
Findings of severity sev, counting those the cap dropped.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
true when any finding is an error, including ones the cap dropped.
Sourcepub fn sorted(&self) -> Vec<&Finding>
pub fn sorted(&self) -> Vec<&Finding>
Findings sorted most severe first, stable within a severity (checks run in a fixed order, so the order is deterministic).
pub fn to_json(&self) -> Value
Trait Implementations§
Auto Trait Implementations§
impl Forget for Report
impl Freeze for Report
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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