pub fn extract_access_rights_from_urefs<I: IntoIterator<Item = URef>>(
    input: I,
) -> HashMap<Address, HashSet<AccessRights>> {
    input
        .into_iter()
        .map(|uref: URef| (uref.addr(), uref.access_rights()))
        .group_by(|(key, _)| *key)
        .into_iter()
        .map(|(key, group)| {
            (
                key,
                group.map(|(_, x)| x).collect::<HashSet<AccessRights>>(),
            )
        })
        .collect()
}
/// Groups a collection of urefs by their addresses and accumulates access
/// rights per key
Groups a collection of urefs by their addresses and accumulates access
rights per key
Groups a collection of urefs by their addresses and accumulates access rights per key
pub fn extract_access_rights_from_urefs<I: IntoIterator<Item = URef>>(
    input: I,
) -> HashMap<Address, HashSet<AccessRights>> {
    input
        .into_iter()
        .map(|uref: URef| (uref.addr(), uref.access_rights()))
        .group_by(|(key, _)| *key)
        .into_iter()
        .map(|(key, group)| {
            (
                key,
                group.map(|(_, x)| x).collect::<HashSet<AccessRights>>(),
            )
        })
        .collect()
}
pub fn extract_access_rights_from_urefs < I : IntoIterator < Item = URef > > ( input : I , ) -> HashMap < Address , HashSet < AccessRights > > { input . into_iter ( ) . map ( | uref : URef | ( uref . addr ( ) , uref . access_rights ( ) ) ) . group_by ( | ( key , _ ) | * key ) . into_iter ( ) . map ( | ( key , group ) | { ( key , group . map ( | ( _ , x ) | x ) . collect :: < HashSet < AccessRights > > ( ) , ) } ) . collect ( ) }
Groups a collection of urefs by their addresses and accumulates access
rights per key
Groups a collection of urefs by their addresses and accumulates access rights per key
input
I
input
I