pub struct ScopeSnapshot { /* private fields */ }Expand description
The one-pass scope snapshot the series is folded from (T007).
Built by ScopeSnapshot::build and immutable afterwards: the member list, the
classified event index, the observed days and the findings are all read once, so a
fold cannot re-read an issue or re-classify an event. The tally
ScopeSnapshot::issues_visited grows inside the build’s one walk, which is what
makes “one pass” checkable rather than merely claimed.
Implementations§
Source§impl ScopeSnapshot
impl ScopeSnapshot
Sourcepub fn build(
config: &Config,
index: &ScheduleIndex,
issues: &[Issue],
scope: &AnalyticsScope,
) -> Self
pub fn build( config: &Config, index: &ScheduleIndex, issues: &[Issue], scope: &AnalyticsScope, ) -> Self
Index issues for scope in one pass (T007).
config supplies the board whose status-category resolution the shared
#183 service is built for, and index is the caller’s
ScheduleIndex — the same index crate::capacity resolves cycle
references through, so a scope naming a generated cycle and one naming its
schedule select the same issues. Nothing here touches a store.
The tally ScopeSnapshot::issues_visited is advanced in the loop below, so it
measures the walk this function performs and not the length of the slice it was
handed.
Sourcepub fn scope(&self) -> &AnalyticsScope
pub fn scope(&self) -> &AnalyticsScope
The scope every contribution was classified against.
Sourcepub fn members(&self) -> &[u32]
pub fn members(&self) -> &[u32]
The scope’s member issue numbers, ascending and deduplicated.
The walk reads the caller’s slice in its own order; this list is the summary it produced, sorted after the walk, so two runs agree however the store was listed.
Sourcepub fn event_index(&self) -> &EventIndex
pub fn event_index(&self) -> &EventIndex
The classified, deduplicated, period-filtered contributions.
Sourcepub fn observed_days(&self) -> &BTreeSet<String>
pub fn observed_days(&self) -> &BTreeSet<String>
Every day that carries a placed recorded event, in calendar order.
Sourcepub fn unplaced_events(&self) -> usize
pub fn unplaced_events(&self) -> usize
How many recorded events carried no readable date.
Sourcepub fn issues_visited(&self) -> usize
pub fn issues_visited(&self) -> usize
How many issue records the pass read — its own “one pass” record.
The counter is advanced inside ScopeSnapshot::build’s single loop over the
caller’s slice, once per issue record, so it is a measurement of the walk and not
a restatement of issues.len(): a second walk doubles it, and the NFR-001 case
anchors “one pass” on it structurally rather than on a wall-clock time. What it
does not observe is stated by omission — it counts reads of the slice walk,
not the cost of the work performed inside the iteration.
Sourcepub fn diagnostics(&self) -> &[AnalyticsDiagnostic]
pub fn diagnostics(&self) -> &[AnalyticsDiagnostic]
The findings the snapshot itself produced, sorted.
Sourcepub fn series(&self, mode: Mode) -> BurndownSeries
pub fn series(&self, mode: Mode) -> BurndownSeries
Fold the snapshot into a series for mode.
Count mode is folded here; estimate mode resolves the shared unit conversion
in WP03’s crate::analytics::units, and until one is available reports
MissingConversion and folds no
units rather than guessing them.
Trait Implementations§
Source§impl Clone for ScopeSnapshot
impl Clone for ScopeSnapshot
Auto Trait Implementations§
impl Freeze for ScopeSnapshot
impl RefUnwindSafe for ScopeSnapshot
impl Send for ScopeSnapshot
impl Sync for ScopeSnapshot
impl Unpin for ScopeSnapshot
impl UnsafeUnpin for ScopeSnapshot
impl UnwindSafe for ScopeSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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