Subtree#
The scope of a scoped run. Set it as subtree in SolveOptions or PreviewOptions to reschedule one task's branch instead of the whole project. It mirrors gantt's autoSchedule(id, inclusive). Create it with Subtree::new, or as a struct literal to set inclusive yourself.
Declaration#
Subtree has no Default.
Fields#
| Field | Type | Default | Description |
|---|---|---|---|
task |
Id |
- | Root task of the scope. The scope covers this task, its ancestors and descendants, and every task reached from them through outgoing links, transitively. Each task reached the same way brings its own ancestors and descendants. |
inclusive |
bool |
true with Subtree::new |
true also follows incoming links, so the scope includes the root's predecessors and their branches. false follows outgoing links only. |
Associated functions#
new#
Creates a scope rooted at task with inclusive: true.
Parameters
| Name | Type | Description |
|---|---|---|
task |
impl Into<Id> |
Root task ID. Accepts String, &str, f64 and i32. |
Returns - a Subtree with inclusive set to true.
Errors#
A task that is unknown or not scheduled makes the call that receives the options fail with Error::Input. The InputError has kind Validation and path subtree.task.
Example#
use Arc;
use ;
// `project` already holds solved data with a task "2".
Related#
SolveOptions- carries the scope forsolvePreviewOptions- carries the scope forpreview- Reschedule a branch - scoping a solve or preview to one branch
- Scheduling a Project -
subtreeamong the solve options