schedule#
Schedules a ProjectData snapshot once and returns the result. The call is stateless: it's equivalent to Project::default().solve(Some(data), options) on a temporary Project that's dropped when the call returns. Nothing is kept between calls.
Signature#
Synchronous and CPU-only. The same data and options always produce the same result.
Parameters#
| Name | Type | Description |
|---|---|---|
data |
ProjectData |
The full snapshot to schedule. Taken by value. |
options |
&SolveOptions |
What to schedule and what to report. &SolveOptions::default() schedules the whole project. |
data is always validated with Validation::Strict.
Returns#
Ok(ScheduleResult), returned by value.
The result's baseline_id is set, but it names the baseline of the temporary project, so no later call can use it.
Errors#
| Error | When it occurs |
|---|---|
Error::Input |
data fails strict validation; see InputError. The rules are listed on ProjectData. |
schedule never returns Error::Project: each call starts from a fresh project.
Example#
use ;
Related#
Project::solve- the stateful equivalent that keeps the baselineScheduleResult- the returned resultInputError- what strict validation reports- Scheduling a Project - when to use one-shot scheduling
- Quick start - a first schedule end to end