aegis-delegate · scope
Declared module signatures, types, configuration, and source documentation.
Source: aegis/aegis-delegate/src/scope.rs. SHA-256: 4229dada749b1877d8702352262536497079b1ae88cc65baed226f73040228f0.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
scope::is_scope_subset
Checks if child scope is a subset of parent scope (no-amplification rule §9.6).
A child scope is a subset when:
- Every action in child is present in parent (or parent has no actions, meaning wildcard)
- Every resource in child is present in parent (or parent has no restrictions)
- Every chain in child is present in parent (or parent has no restrictions)
- Child limits are at least as restrictive as parent limits
pub fn is_scope_subset(child: &DelegationScope, parent: &DelegationScope) -> bool;Source line: 17.
scope::intersect_scopes
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
pub fn intersect_scopes(a: &DelegationScope, b: &DelegationScope) -> DelegationScope;Source line: 131.
scope::validate_scope
Validates that a delegation scope is well-formed.
A scope is well-formed if:
- Actions, resources, and chains contain no empty strings
- If limits are present, numeric fields parse as valid numbers
pub fn validate_scope(scope: &DelegationScope) -> Result<(), DelegationError>;Source line: 257.