AnalyticsStatus#
Tells you whether the engine could compute the analytics you requested. It's the type of the Analytics::status field, which you get in ScheduleResult::analytics when AnalyticsOptions asks for the critical path or slack.
Declaration#
With the serde feature, AnalyticsStatus implements Serialize and Deserialize. Variants are written in kebab-case: "available", "invalid".
Variants#
| Variant | Serialized | Description |
|---|---|---|
Available |
"available" |
The analytics were computed. Analytics::critical_path and Analytics::slack hold whatever you requested. |
Invalid |
"invalid" |
The task graph has a dependency cycle, so the analytics can't be computed. critical_path and slack are both None. |
When the status is Invalid, look in ScheduleResult::cycles to find the cycle.
Example#
Request the critical path for two tasks linked in a cycle, then check the status before reading it:
use ;
Related#
Analytics- holds the status next to the computed dataCycle- the cycle that makes the statusInvalidAnalyticsOptions- requests the analytics the status reports on- Critical path and slack - checks the status before reading analytics