Skip to main content

write_set

Function write_set 

Source
pub fn write_set(
    plan: &DeployPlanResult,
    declared: &Declared,
) -> Result<WriteSet, CoreError>
Expand description

The write set of plan (research Pattern 3).

Every rendered file of every added or changed unit is written, whole units and never a partial one in the mode collection; same and unmanaged units are never written. The deletes are the plan’s delete set. Each touched path carries the hash the plan saw in the MODE collection: live_sha256 where the entry is live in mode, else none (a copy that only core holds is not a file of the mode collection). A delete without such a hash, or a rendered file whose bytes are not the ones the plan hashed, is a defect, reported as CoreError::Internal.