Skip to main content

ScopeSnapshot

Struct ScopeSnapshot 

Source
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

Source

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.

Source

pub fn scope(&self) -> &AnalyticsScope

The scope every contribution was classified against.

Source

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.

Source

pub fn event_index(&self) -> &EventIndex

The classified, deduplicated, period-filtered contributions.

Source

pub fn observed_days(&self) -> &BTreeSet<String>

Every day that carries a placed recorded event, in calendar order.

Source

pub fn unplaced_events(&self) -> usize

How many recorded events carried no readable date.

Source

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.

Source

pub fn diagnostics(&self) -> &[AnalyticsDiagnostic]

The findings the snapshot itself produced, sorted.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScopeSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.