pub(crate) fn uref_has_access_rights(
    uref: &URef,
    access_rights: &HashMap<Address, HashSet<AccessRights>>,
) -> bool {
    if let Some(known_rights) = access_rights.get(&uref.addr()) {
        let new_rights = uref.access_rights();
        // check if we have sufficient access rights
        known_rights
            .iter()
            .any(|right| *right & new_rights == new_rights)
    } else {
        // URef is not known
        false
    }
}
/// Checks whether given uref has enough access rights.
Checks whether given uref has enough access rights.
Checks whether given uref has enough access rights .
pub(crate) fn uref_has_access_rights(
    uref: &URef,
    access_rights: &HashMap<Address, HashSet<AccessRights>>,
) -> bool {
    if let Some(known_rights) = access_rights.get(&uref.addr()) {
        let new_rights = uref.access_rights();
        // check if we have sufficient access rights
        known_rights
            .iter()
            .any(|right| *right & new_rights == new_rights)
    } else {
        // URef is not known
        false
    }
}
pub ( crate ) fn uref_has_access_rights ( uref : & URef , access_rights : & HashMap < Address , HashSet < AccessRights > > , ) -> bool { if let Some ( known_rights ) = access_rights . get ( & uref . addr ( ) ) { let new_rights = uref . access_rights ( ) ; // check if we have sufficient access rights known_rights . iter ( ) . any ( | right | * right & new_rights == new_rights ) } else { // URef is not known false } }
Checks whether given uref has enough access rights.
Checks whether given uref has enough access rights .
uref
&URef
access_rights
&HashMap<Address, HashSet<AccessRights>>
uref
&URef
access_rights
&HashMap<Address, HashSet<AccessRights>>