Skip to main content

rewrite_occurrence_refs

Function rewrite_occurrence_refs 

Source
pub fn rewrite_occurrence_refs(
    params: &mut Value,
    namespace: impl FnMut(&[usize]) -> Option<String>,
) -> usize
Expand description

Rewrite every occurrence-scoped reference in a lifted annotation’s params into the consumer’s own namespace. namespace turns an occurrence chain into the prefix a reference to that instance’s geometry opens with ("ACOMP3:", or "" for a component that IS the document); None from it means the consumer placed no component for that chain, and the reference is left naming the chain so the row reports itself rather than resolving to the wrong instance.

The one function a consumer of StepAssembly::pmi needs: the chain encoding is this module’s business, not theirs.