pub struct Observations { /* private fields */ }Expand description
The paths that a program touched, each with its access kinds and each kind with its outcomes, in sorted path order.
Recording and merging are set unions: a path keeps every kind recorded for it, and a kind every outcome, each once, whatever the order.
Implementations§
Source§impl Observations
impl Observations
Sourcepub fn from_accesses(accesses: &Accesses, outcome: &Outcome) -> Self
pub fn from_accesses(accesses: &Accesses, outcome: &Outcome) -> Self
The observations of every path of accesses, each of its kinds with
outcome alone.
Sourcepub fn record(&mut self, path: AbsolutePath, kind: AccessKind, outcome: Outcome)
pub fn record(&mut self, path: AbsolutePath, kind: AccessKind, outcome: Outcome)
Record that a call with outcome touched path in the way kind names.
Sourcepub fn record_kinds(
&mut self,
path: AbsolutePath,
kinds: AccessKinds,
outcome: &Outcome,
)
pub fn record_kinds( &mut self, path: AbsolutePath, kinds: AccessKinds, outcome: &Outcome, )
Record that a call with outcome touched path in every way of kinds.
The path is observed even when kinds is empty, as Accesses::record_kinds
records it.
Sourcepub fn get(&self, path: &AbsolutePath) -> Option<&KindOutcomes>
pub fn get(&self, path: &AbsolutePath) -> Option<&KindOutcomes>
The kinds of path, each with its outcomes, if it was observed.
Sourcepub fn kinds(&self, path: &AbsolutePath) -> Option<AccessKinds>
pub fn kinds(&self, path: &AbsolutePath) -> Option<AccessKinds>
The combined access kinds of path, if it was observed.
Sourcepub fn iter(&self) -> Iter<'_, AbsolutePath, KindOutcomes> ⓘ
pub fn iter(&self) -> Iter<'_, AbsolutePath, KindOutcomes> ⓘ
The observed paths with their kinds and outcomes, in sorted path order.
Trait Implementations§
Source§impl Clone for Observations
impl Clone for Observations
Source§impl Debug for Observations
impl Debug for Observations
Source§impl Default for Observations
impl Default for Observations
impl Eq for Observations
Source§impl<'a> IntoIterator for &'a Observations
impl<'a> IntoIterator for &'a Observations
Source§type IntoIter = Iter<'a, AbsolutePath, BTreeMap<AccessKind, BTreeSet<Outcome>>>
type IntoIter = Iter<'a, AbsolutePath, BTreeMap<AccessKind, BTreeSet<Outcome>>>
Which kind of iterator are we turning this into?
Source§type Item = (&'a AbsolutePath, &'a BTreeMap<AccessKind, BTreeSet<Outcome>>)
type Item = (&'a AbsolutePath, &'a BTreeMap<AccessKind, BTreeSet<Outcome>>)
The type of the elements being iterated over.
Source§impl PartialEq for Observations
impl PartialEq for Observations
impl StructuralPartialEq for Observations
Auto Trait Implementations§
impl Freeze for Observations
impl RefUnwindSafe for Observations
impl Send for Observations
impl Sync for Observations
impl Unpin for Observations
impl UnsafeUnpin for Observations
impl UnwindSafe for Observations
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