pub fn stream_export_model_with_options(
content: &[u8],
entity_index: &Arc<EntityIndex>,
opts: &ModelOptions,
f: impl FnMut(EntityRow, Option<&DecodedEntity>),
) -> UnitScalesExpand description
stream_export_model_with_index, plus the decoded entity behind each row
and whatever ModelOptions asked to resolve.
The second callback argument is the DecodedEntity the row was built from,
borrowed: a caller that wants an attribute this crate does not surface
reads it here, without this crate having to guess which attributes matter
and without anything being retained. It is None for the type-product rows emitted in
pass 3, which are assembled from the pass-1 scan and have no occurrence
entity behind them.
Storing the attributes on EntityRow instead would be the obvious shape
and is the wrong one twice over: AttributeValue is not PartialEq, so it
would break the derive that stream == build equality rests on, and
build_export_model collects, so every product’s attribute vector would
stay resident — which is the exact bound this function exists to keep.