Skip to main content

intersect_scopes

Function intersect_scopes 

Source
pub fn intersect_scopes(
    a: &DelegationScope,
    b: &DelegationScope,
) -> DelegationScope
Expand description

Computes the intersection of two scopes (intersection narrowing rule §9.6).

For each dimension:

  • If either side is empty (wildcard), use the other side’s restriction
  • Otherwise, take the set intersection
  • For limits, take the most restrictive value