pub fn labels<I>( labels: I, exemplar_owned: bool, validate_name: impl Fn(&[u8]) -> bool, ) -> Result<BTreeMap<String, String>>where I: IntoIterator<Item = (String, String)>,
Validates labels with the protocol’s name policy, preserving duplicates as errors.