Function cedar_policy_core::extensions::util::collect_no_duplicates

source ยท
pub fn collect_no_duplicates<K, V>(
    i: impl Iterator<Item = (K, V)>,
) -> Result<HashMap<K, V>, K>
where K: Clone + Hash + Eq,
Expand description

Utility to build a HashMap of key value pairs from an iterator, returning an Err result if there are any duplicate keys in the iterator.