pub struct ChartScope {
pub kind: String,
pub id: String,
pub period: ChartPeriod,
pub snapshot_id: Option<String>,
}Expand description
The scope a document describes, in the document’s own serde shape
(data-model.md §1/§6).
A field-for-field mirror of WP01’s AnalyticsScope — the kind, the stable id, the
inclusive period and the closed-snapshot binding — because that type carries no serde
derive and is owned by another package. snapshot_id is the closed-series
provenance: when it is present the document describes a closed view whose period
bounds it (C-006), so a later edit is not a contribution to it.
Fields§
§kind: StringWhich planning entity id names: the ScopeKind
spelling (cycle / milestone).
id: StringThe stable planning identity (a cycle name, a milestone name).
period: ChartPeriodThe inclusive period context.
snapshot_id: Option<String>The closed snapshot this series is bound to, when it is bound to one.
Implementations§
Source§impl ChartScope
impl ChartScope
Sourcepub fn from_scope(scope: &AnalyticsScope) -> Self
pub fn from_scope(scope: &AnalyticsScope) -> Self
Project a shared AnalyticsScope into the document’s shape.
A pure field copy: the kind is the scope’s own canonical spelling, the period an
absent bound stays null (never an empty string or a 0), and the snapshot
binding is carried verbatim. Nothing is resolved or inferred.
Trait Implementations§
Source§impl Clone for ChartScope
impl Clone for ChartScope
Source§impl Debug for ChartScope
impl Debug for ChartScope
Source§impl<'de> Deserialize<'de> for ChartScope
impl<'de> Deserialize<'de> for ChartScope
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>,
impl Eq for ChartScope
Source§impl PartialEq for ChartScope
impl PartialEq for ChartScope
Source§impl Serialize for ChartScope
impl Serialize for ChartScope
impl StructuralPartialEq for ChartScope
Auto Trait Implementations§
impl Freeze for ChartScope
impl RefUnwindSafe for ChartScope
impl Send for ChartScope
impl Sync for ChartScope
impl Unpin for ChartScope
impl UnsafeUnpin for ChartScope
impl UnwindSafe for ChartScope
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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