pub enum ResolvedScope {
Bounded {
concrete: BTreeSet<String>,
classes: BTreeSet<String>,
},
Unbounded,
Unknown,
}Expand description
What a native fence actually permits on ONE axis, expressed portably (the projection agent-bridle produces from its native profile). The lattice the L3 BOUND law is computed over — fidelity is never asserted.
Variants§
Bounded
Bounded authority: the union of concrete items the mechanism permits
(e.g. canonicalized paths / hosts) and named capability classes it
permits but cannot enumerate as a concrete set (e.g. a whole loopback
interface). The two are independent dimensions, so a fence can permit both.
The empty scope ({}, {}) is the bottom / identity element for
union: ∅ ∪ X = X.
Unbounded
The mechanism imposes no restriction on this axis (⊤, the top element).
Unknown
The mechanism’s authority on this axis could not be resolved. Any
comparison involving Unknown is Unknown → fail-closed (L7).
Implementations§
Source§impl ResolvedScope
impl ResolvedScope
Sourcepub fn concrete<I: IntoIterator<Item = String>>(items: I) -> Self
pub fn concrete<I: IntoIterator<Item = String>>(items: I) -> Self
A bounded scope of concrete items only.
Sourcepub fn class(name: impl Into<String>) -> Self
pub fn class(name: impl Into<String>) -> Self
A bounded scope of a single named capability class only.
Sourcepub fn from_scope(scope: &Scope<String>) -> Self
pub fn from_scope(scope: &Scope<String>) -> Self
Lift a delegated Scope<String> into the resolved lattice: All ⇒ Unbounded, Only(set) ⇒ Bounded{concrete: set}.
Sourcepub fn union(&self, other: &Self) -> Self
pub fn union(&self, other: &Self) -> Self
The union self ∪ other — the bounding authority when combining the
delegated grant with the authorized closure. Unknown propagates
(fail-closed); Unbounded absorbs; two bounded scopes union their concrete
and class dimensions independently. The empty scope is the identity, so
∅ ∪ X = X for every X (the composability law).