Skip to main content

Plan

Struct Plan 

Source
pub struct Plan {
Show 14 fields pub format_version: u32, pub assets: BTreeMap<AssetId, WorkspaceAsset>, pub workspace: Workspace, pub revision: u64, pub projects: BTreeMap<ProjectId, Project>, pub work_items: BTreeMap<WorkItemId, WorkItem>, pub requirements: BTreeMap<RequirementId, Requirement>, pub artifacts: BTreeMap<ArtifactId, Artifact>, pub decisions: BTreeMap<DecisionId, Decision>, pub risks: BTreeMap<RiskId, Risk>, pub dependencies: Vec<Dependency>, pub external_references: BTreeMap<ExternalReferenceId, ExternalReference>, pub links: Vec<WorkLink>, pub calendars: Option<Calendars>,
}
Expand description

Authoritative graph and revision; scheduling and completion views are derived.

Fields§

§format_version: u32

Portable domain format version; unsupported formats are rejected.

§assets: BTreeMap<AssetId, WorkspaceAsset>

Assets shared across code and non-code work.

§workspace: Workspace

Namespace containing the graph.

§revision: u64

Wrapping operation sequence for optimistic concurrency.

§projects: BTreeMap<ProjectId, Project>

Projects indexed by stable identifier.

§work_items: BTreeMap<WorkItemId, WorkItem>

Work indexed by stable identifier.

§requirements: BTreeMap<RequirementId, Requirement>

Requirements indexed by stable identifier.

§artifacts: BTreeMap<ArtifactId, Artifact>

Evidence indexed by stable identifier.

§decisions: BTreeMap<DecisionId, Decision>

Decision gates indexed by stable identifier.

§risks: BTreeMap<RiskId, Risk>

Risks indexed by stable identifier.

§dependencies: Vec<Dependency>

Directed temporal constraints; cycles are rejected.

§external_references: BTreeMap<ExternalReferenceId, ExternalReference>

External tracker objects linked to work; context only, never evidence or gates.

§links: Vec<WorkLink>

Contextual work relationships that never gate readiness, scheduling or progress.

§calendars: Option<Calendars>

Working calendars; every hour is working time when absent.

Implementations§

Source§

impl Plan

Source

pub fn work_calendar(&self, work: &WorkItem) -> Option<ResolvedCalendar>

Calendar and executor a projection uses for work, or None without a calendars block.

Source

pub fn lag_end( &self, edge: &Dependency, event_at: DateTime<Utc>, hours: f64, ) -> Option<DateTime<Utc>>

When a dependency’s positive lag after event_at has passed: elapsed hours, or working hours of the successor’s calendar for a working-time lag. None when out of range.

Source§

impl Plan

Source

pub fn applicability(&self) -> BTreeMap<WorkItemId, Applicability>

Applicability of every work item; time-independent, so reviews can compare two plans.

Source

pub fn effective_decision(&self, id: DecisionId) -> Option<&Decision>

The decision whose outcome currently stands for id, following replacements.

Source§

impl Plan

Source

pub fn empty(name: impl Into<String>) -> Self

Create an empty namespace at revision zero.

Source

pub fn find_work_by_key(&self, key: &str) -> Option<&WorkItem>

Find authoritative work by its human-readable key.

Source

pub fn find_work_by_key_mut(&mut self, key: &str) -> Option<&mut WorkItem>

Mutably find authoritative work; callers must validate edits.

Source

pub fn find_dependency(&self, id: DependencyId) -> Option<&Dependency>

Find a temporal constraint by its stable identity.

Source

pub fn enforced_dependencies(&self) -> impl Iterator<Item = &Dependency>

Constraints that currently gate execution and remaining projections; waived edges are omitted.

Source

pub fn find_decision_by_key(&self, key: &str) -> Option<&Decision>

Find a gate by its human-readable key.

Source§

impl Plan

Source

pub fn validate(&self) -> Result<(), ValidationError>

Validate references, keys, containment, execution contracts, and numerical inputs.

Call this at import, command, and persistence boundaries. It does not mutate the plan.

Trait Implementations§

Source§

impl Clone for Plan

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 Plan

Source§

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

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

impl<'de> Deserialize<'de> for Plan

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Plan

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 Serialize for Plan

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Plan

Auto Trait Implementations§

§

impl Freeze for Plan

§

impl RefUnwindSafe for Plan

§

impl Send for Plan

§

impl Sync for Plan

§

impl Unpin for Plan

§

impl UnsafeUnpin for Plan

§

impl UnwindSafe for Plan

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Same for T

Source§

type Output = T

Should always be Self
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.