Skip to main content

affected_link_keys

Function affected_link_keys 

Source
pub fn affected_link_keys<T, K>(
    plan: &ExtractorBatchPlan,
    previous: &[ExtractorBatch<T>],
    current: &[ExtractorBatch<T>],
    link_key: impl Fn(&T) -> K,
) -> Result<BTreeSet<K>, BatchPlanError>
where K: Ord,
Expand description

Computes exact link neighborhoods affected by add, modify, and delete actions.

Modified sources contribute old and new keys, deleted sources contribute old keys, and added sources contribute new keys. Unchanged sources do not trigger relinking.

ยงErrors

Returns BatchPlanError for duplicate source batches or when a changed action lacks the required previous/current batch.