ApplyReport#
The outcome of one Project::apply call. It lists which operations of the SchedulingChanges batch were accepted, which were rejected, what the accepted ones removed, generated or dropped, and whether the project now needs a full resync. A rejected operation is reported here, not as an Err.
Declaration#
With the serde feature, ApplyReport implements Serialize and Deserialize with camelCase field names (needsResync).
Fields#
applied#
pub applied:
Operations that took effect, in the order apply ran them.
rejected#
pub rejected:
Operations that were refused, in the same order. A rejected operation leaves no partial edit. Empty when the whole batch was accepted.
effects#
pub effects: ChangeEffects
Ids removed, generated or dropped as a result of the accepted operations.
needs_resync#
pub needs_resync: bool
true when rejected isn't empty. See Project::apply for what the project accepts while it's set.
revision#
pub revision: u64
The project's state revision after this call. Every apply raises it, so a larger value from the same Project means a later state.
Every operation of the batch appears in exactly one of applied and rejected. For the order operations run in, see SchedulingChanges.
Example#
Accept one edit, reject another, then resync.
use ;
Related#
Project::apply- returns this reportSchedulingChanges- the change set the report describes- Data Updates - shows how to read the report and handle rejections
- Recover from rejected changes - shows how to act on
needs_resync