Analytics#
Critical path and slack computed over a schedule's dates. It's the analytics field of ScheduleResult. That field is Some only when the call's AnalyticsOptions set critical_path, slack, or both. With both false, it's None.
Declaration#
With the serde feature, Analytics implements Serialize and Deserialize. Fields use camelCase (criticalPath), and None fields are left out. See Serialize results to JSON.
Fields#
| Field | Type | Description |
|---|---|---|
status |
AnalyticsStatus |
Whether the analytics could be computed. |
critical_path |
Option<Critical> |
Critical tasks and links. Some when AnalyticsOptions::critical_path is true and status is Available. |
slack |
Option<Vec<TaskSlack>> |
Total and free slack per task. Some when AnalyticsOptions::slack is true and status is Available. |
With status set to AnalyticsStatus::Invalid, both critical_path and slack are None, whatever the options asked for. Check status before reading the other fields.
Example#
Requests the critical path and slack for three tasks and prints both.
use ;
Related#
AnalyticsOptions- selects which analytics are computedScheduleResult- holds the analytics of a callSolveOptions- passes the analytics request tosolve- Critical path and slack - requests and reads analytics