pub struct Task {Show 13 fields
pub id: String,
pub name: String,
pub kind: TaskKind,
pub effort_hours: f32,
pub dependencies: Vec<String>,
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: f32Estimated effort in hours.
dependencies: Vec<String>Task IDs this depends on (must complete before this can start).
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
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
Mutably borrows from an owned value. Read more