RejectedOperation#
One operation of a change set that the engine refused. Project::apply lists these in ApplyReport::rejected, and CandidateResult::error uses the same type for a candidate that failed. It's read-only output: the engine creates it, the caller only reads the fields.
Declaration#
With the serde feature, the type also implements Serialize and Deserialize, with camelCase field names.
Fields#
| Field | Type | Description |
|---|---|---|
path |
String |
Where the operation sits in the change set, as group.verb[index], for example tasks.update[0] or links.add[2]. The index counts within that list of SchedulingChanges. In CandidateResult::error, a failure that comes from scheduling or leveling the candidate carries the path of the input error, or an empty string when that error has no path. |
message |
String |
Why the operation was refused, for example unknown task id. Plain text for display or logging, not a stable error code. |
Example#
Update a task that doesn't exist and read the rejection.
use ;
Related#
ApplyReport- lists rejected operations inrejectedAppliedOperation- the counterpart for accepted operationsCandidateResult- reports a failed candidate with this type- Recover from rejected changes - shows what to do after a rejection
- Error handling - explains why rejections aren't errors