pub struct ChartProjection {
pub scope: ChartScope,
pub mode: Mode,
pub unit: Option<String>,
pub as_of: String,
pub end_date: String,
pub remaining: Option<i64>,
pub observed_rate: Option<f64>,
pub projected_completion: Option<String>,
pub meets_end_date: Option<bool>,
pub status: ProjectionStatus,
pub formula_version: String,
pub diagnostics: Vec<AnalyticsDiagnostic>,
}Expand description
The optional read-only end-date forecast, in the document’s own serde shape
(data-model.md §5).
A mirror of WP03’s Projection, which carries an AnalyticsScope and therefore
no serde derive. remaining and observed_rate are in the series’ own unit, which
mode/unit carry so a reader never sees a rate without the unit it is expressed
in; a value the series could not answer is null, and status says what the
forecast could do.
Fields§
§scope: ChartScopeThe selected cycle/milestone, period and snapshot binding.
mode: ModeHow the series the projection was drawn from counts.
unit: Option<String>The unit the remaining work and the rate are expressed in, null in count mode.
as_of: StringThe forecast origin — the caller’s day, never a clock.
end_date: StringThe planning end date the forecast is drawn against.
remaining: Option<i64>The remaining work the series carried to as_of, in the series’ unit.
observed_rate: Option<f64>The observed completion rate, in the series’ unit per calendar day.
The document’s only fractional quantity: every level and delta is whole (see
precision_of), while this quotient is not. It is the shared projection’s own
value, copied — never re-computed here.
projected_completion: Option<String>The forecast completion date, when one follows.
meets_end_date: Option<bool>Whether the projected completion falls on or before end_date; null when no
date was projected.
status: ProjectionStatusWhether the projection could answer, and with what.
formula_version: StringThe documented formula this projection was drawn under.
diagnostics: Vec<AnalyticsDiagnostic>Why no date was projected, when one was not.
Implementations§
Source§impl ChartProjection
impl ChartProjection
Sourcepub fn from_projection(projection: &Projection) -> Self
pub fn from_projection(projection: &Projection) -> Self
Project a shared Projection into the document’s shape.
A pure field copy: the status, the dates, the remaining work and the rate are the
projection’s own values, and its findings travel verbatim. Nothing is re-derived,
so a chart document cannot disagree with tix analytics project.
Trait Implementations§
Source§impl Clone for ChartProjection
impl Clone for ChartProjection
Source§impl Debug for ChartProjection
impl Debug for ChartProjection
Source§impl<'de> Deserialize<'de> for ChartProjection
impl<'de> Deserialize<'de> for ChartProjection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ChartProjection
impl PartialEq for ChartProjection
Source§impl Serialize for ChartProjection
impl Serialize for ChartProjection
impl StructuralPartialEq for ChartProjection
Auto Trait Implementations§
impl Freeze for ChartProjection
impl RefUnwindSafe for ChartProjection
impl Send for ChartProjection
impl Sync for ChartProjection
impl Unpin for ChartProjection
impl UnsafeUnpin for ChartProjection
impl UnwindSafe for ChartProjection
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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