pub struct CoverageRecord {
pub schema: u32,
pub commit: String,
pub working_tree: String,
pub at: String,
pub outcome: String,
pub suite_exit: i32,
pub krate: CoverageDimensions,
}Expand description
One recorded coverage measurement: the fields of COVERAGE_RECORD this reads.
use majordomus_cli::environment::preflight::CoverageRecord;
let r: CoverageRecord = serde_json::from_str(r#"{"schema": 1, "commit": "abc",
"working_tree": "clean", "at": "2026-09-30T00:00:00Z", "outcome": "pass",
"crate": {"lines": {"covered": 9, "total": 10}, "functions": {"covered": 1, "total": 1},
"regions": {"covered": 3, "total": 4}}}"#).unwrap();
// a record written before the suite's exit status was kept reads as a passing suite
assert_eq!(r.suite_exit, 0);
assert_eq!(r.krate.lines.covered, 9);Fields§
§schema: u32The format; this reads 1.
commit: StringHEAD when the measurement began.
working_tree: Stringclean only when the tree was clean and HEAD unmoved from the run’s start to its end.
at: StringWhen it was recorded, RFC 3339.
outcome: Stringpass or fail against the thresholds, or report when none was held.
suite_exit: i32cargo’s exit status for the instrumented suite; non-zero means a test failed.
krate: CoverageDimensionsThe crate, test code excluded.
Trait Implementations§
Source§impl Clone for CoverageRecord
impl Clone for CoverageRecord
Source§fn clone(&self) -> CoverageRecord
fn clone(&self) -> CoverageRecord
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 CoverageRecord
impl Debug for CoverageRecord
Source§impl<'de> Deserialize<'de> for CoverageRecord
impl<'de> Deserialize<'de> for CoverageRecord
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
impl Eq for CoverageRecord
Source§impl PartialEq for CoverageRecord
impl PartialEq for CoverageRecord
Source§fn eq(&self, other: &CoverageRecord) -> bool
fn eq(&self, other: &CoverageRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CoverageRecord
Auto Trait Implementations§
impl Freeze for CoverageRecord
impl RefUnwindSafe for CoverageRecord
impl Send for CoverageRecord
impl Sync for CoverageRecord
impl Unpin for CoverageRecord
impl UnsafeUnpin for CoverageRecord
impl UnwindSafe for CoverageRecord
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.