Skip to main content

stamp_marked_attrs_into_flattrs

Function stamp_marked_attrs_into_flattrs 

Source
pub fn stamp_marked_attrs_into_flattrs(
    dst: &mut Flattrs,
    attrs: &Attrs,
    marker: Key<bool>,
)
Expand description

Copy every entry from attrs onto dst whose declared attribute key carries the bool meta marker marker with value true. Overwrite semantics (see Flattrs::set_serialized) — a later write for the same key_hash is the value returned by Flattrs::get. Entries whose declared key lacks the marker are silently skipped; entries whose key is not declared are also silently skipped.

Generic category-filter stamp. The lower layer does not know what category the marker names; callers pass the marker key that defines their vocabulary (e.g. ATTRIBUTION_HEADER). This is the single mechanism every Attrs → Flattrs stamp for a category should go through, so category membership is declared in one place (the meta annotation on each key) and enforced in one place (this helper).