Skip to main content

TimeTotal

Struct TimeTotal 

Source
pub struct TimeTotal {
    pub filter: TimeFilter,
    pub group: TimeGroup,
    pub total_minutes: Option<i128>,
    pub entry_count: usize,
    pub malformed_count: usize,
    pub undated_count: usize,
    pub deleted_count: Option<usize>,
    pub diagnostics: Vec<TimeDiagnostic>,
}
Expand description

A typed integer-minute aggregate for one scope (data-model §4).

Every number beside the total is a count a reader needs to know whether the total is the whole story: how many entries were counted, how many were malformed (excluded from the total, each with a finding), how many the period could not place because they carry no date, and — only when the filter asked for audit context — how many prior values a deletion left in History.

Fields§

§filter: TimeFilter

The selector this total was evaluated under (data-model §4’s scope).

§group: TimeGroup

The dimension this total is grouped by.

§total_minutes: Option<i128>

The sum of the counted entries’ minutes. None when nothing was counted; Some(0) only when a zero was actually recorded.

§entry_count: usize

Valid entries counted into the sum.

§malformed_count: usize

Entries whose own fields are unusable. They contribute no number, and each has its own finding.

§undated_count: usize

Valid entries a period-bounded filter could not place because they carry no date. Their value is unknown to the period, never zero (C-005).

§deleted_count: Option<usize>

Prior values deletions left in History on the issues this total is about. Some only when the filter asked for audit context (T017), and never part of the sum.

The set counted is the scope’s own: an ungrouped total counts the issues the filter’s selector covers, which is exactly what TimeSnapshot::audit reports for the same filter — so an issue whose current entries were all deleted still reports the values History keeps, never a zero; a per-issue group counts its issue; an identity or date group counts the issues its entries were drawn from, because History’s prior values are not re-parsed here and a deletion cannot be attributed to an identity or a date.

§diagnostics: Vec<TimeDiagnostic>

Every finding, scope findings first, then per entry in index order (T016).

Implementations§

Source§

impl TimeTotal

Source

pub fn state(&self) -> TimeTotalState

The explicit state of this total (T015).

Source

pub const fn is_partial(&self) -> bool

Whether some selected entry was left out of the sum (T015).

True when a malformed entry contributed no number, and when a period-bounded scope selected a valid entry it could not place: in both cases the total is not the whole story, and a reader must be shown the counts and findings before the number means anything.

Trait Implementations§

Source§

impl Clone for TimeTotal

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 TimeTotal

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for TimeTotal

Source§

impl PartialEq for TimeTotal

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TimeTotal

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.