pub struct Dependency {
pub id: DependencyId,
pub predecessor: WorkItemId,
pub successor: WorkItemId,
pub kind: DependencyKind,
pub lag_hours: f64,
pub lag_basis: LagBasis,
pub policy: DependencyPolicy,
pub start_basis: StartBasis,
pub rationale: Option<String>,
pub waiver: Option<DependencyWaiver>,
}Expand description
Independently addressable temporal constraint between two work items.
Fields§
§id: DependencyIdStable edge identity; unique within the plan.
predecessor: WorkItemIdActivity providing the constrained start or finish.
successor: WorkItemIdActivity whose start or finish has the lower bound.
kind: DependencyKindDomain category of this value.
lag_hours: f64Positive values add delay; negative values are lead time.
lag_basis: LagBasisWhether the lag counts elapsed or working hours.
policy: DependencyPolicyWhether the constraint may be waived.
start_basis: StartBasisPredecessor result that releases the successor’s start; changed only by reviewed plan change.
rationale: Option<String>Optional author explanation of why the constraint and its policy exist.
waiver: Option<DependencyWaiver>Present while a soft constraint is set aside; changed only by waive/restore commands.
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn derived_id(
predecessor: WorkItemId,
successor: WorkItemId,
kind: DependencyKind,
) -> DependencyId
pub fn derived_id( predecessor: WorkItemId, successor: WorkItemId, kind: DependencyKind, ) -> DependencyId
Deterministic identity for a newly constructed constraint.
Constructors and interchange adapters must agree on a new edge’s identity. Persisted edges carry that identity explicitly and retain it when edited. Validation allows one relation of each kind per ordered pair; a hash collision would surface as a duplicate-identity validation error rather than merging two edges.
Sourcepub fn new(
predecessor: WorkItemId,
successor: WorkItemId,
kind: DependencyKind,
lag_hours: f64,
) -> Self
pub fn new( predecessor: WorkItemId, successor: WorkItemId, kind: DependencyKind, lag_hours: f64, ) -> Self
Hard constraint with a derived identity and no rationale.