Skip to main content

patch

Function patch 

Source
pub fn patch(
    current: &Plan,
    changes: &[EntityChange],
) -> Result<Plan, EngineError>
Expand description

Apply entity changes to current without any policy check.

Every change’s before must equal the entity in current (null for an addition), otherwise the delta was computed against another state and EngineError::StaleChange is returned. Each entity may appear once. Validation and protection are the caller’s responsibility.