pub struct Baseline {
pub probes: BTreeMap<String, ProbeLock>,
}Expand description
The lock file: probe name → locked state.
Fields§
§probes: BTreeMap<String, ProbeLock>Implementations§
Source§impl Baseline
impl Baseline
pub fn parse(text: &str) -> Result<Baseline, String>
pub fn render(&self) -> String
Sourcepub fn gate(
&self,
probe: &str,
observed: &BTreeMap<String, bool>,
pinned_sometimes: &[String],
declared: Option<&BTreeSet<String>>,
) -> Findings
pub fn gate( &self, probe: &str, observed: &BTreeMap<String, bool>, pinned_sometimes: &[String], declared: Option<&BTreeSet<String>>, ) -> Findings
Gate one probe’s observed population against its locked classes.
pinned_sometimes are manifest-declared intermittent fields; they
gate like sometimes regardless of the locked class. declared
is the spec’s field enumeration when coverage applies.
Sourcepub fn accept(
&mut self,
probe: &str,
observed: &BTreeMap<String, bool>,
declared: Option<&BTreeSet<String>>,
)
pub fn accept( &mut self, probe: &str, observed: &BTreeMap<String, bool>, declared: Option<&BTreeSet<String>>, )
Fold one probe’s observed population into the lock. First sight of
a populated field locks it always; any accepted run that sees a
locked field empty demotes it to sometimes, permanently. The
uncovered list is recomputed from declared: whatever still has
no class after this run is the probe’s accepted coverage debt.
Sourcepub fn retain_probes(&mut self, declared: &[String]) -> Vec<String>
pub fn retain_probes(&mut self, declared: &[String]) -> Vec<String>
Drop locked probes the manifest no longer declares. Returns the
dropped names so the gate can refuse them without --allow-gone.
Trait Implementations§
impl StructuralPartialEq for Baseline
Auto Trait Implementations§
impl Freeze for Baseline
impl RefUnwindSafe for Baseline
impl Send for Baseline
impl Sync for Baseline
impl Unpin for Baseline
impl UnsafeUnpin for Baseline
impl UnwindSafe for Baseline
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