pub struct Task {Show 14 fields
pub id: String,
pub name: String,
pub kind: TaskKind,
pub effort_hours: f32,
pub dependencies: Vec<String>,
pub lag_by_dependency: HashMap<String, f32>,
pub status: TaskStatus,
pub earliest_start: f32,
pub earliest_finish: f32,
pub latest_start: f32,
pub latest_finish: f32,
pub float: f32,
pub is_critical: bool,
pub affected_files: Vec<String>,
}Expand description
A single task in the CPM plan.
Fields§
§id: StringUnique identifier.
name: StringHuman-readable name.
kind: TaskKindType of task.
effort_hours: f32Scheduled length in hours. For tasks built from a deliverable this is
its calendar duration_hours when set, else its effort estimate;
earned value reads effort from the graph, not from here.
dependencies: Vec<String>Task IDs this depends on (must complete before this can start).
lag_by_dependency: HashMap<String, f32>Minimum wait in hours between a dependency’s finish and this task’s start, keyed by dependency id. Absent means 0.
status: TaskStatusCurrent status.
earliest_start: f32Earliest start time (calculated by forward pass).
earliest_finish: f32Earliest finish time (ES + effort).
latest_start: f32Latest start time (calculated by backward pass).
latest_finish: f32Latest finish time.
float: f32Float/slack time (LS - ES).
is_critical: boolIs this task on the critical path?
affected_files: Vec<String>Files affected by this task (for context building, domain-neutral).
Implementations§
Source§impl Task
impl Task
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
kind: TaskKind,
effort_hours: f32,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, kind: TaskKind, effort_hours: f32, ) -> Self
Create a new task with the given ID, name, kind, and effort.
Sourcepub fn depends_on(self, task_id: impl Into<String>) -> Self
pub fn depends_on(self, task_id: impl Into<String>) -> Self
Add a dependency to this task.
Sourcepub fn affects_file(self, file: impl Into<String>) -> Self
pub fn affects_file(self, file: impl Into<String>) -> Self
Add an affected file.