pub struct Resolved {
pub effective: Permissions,
pub grants: Permissions,
pub before_lockdown: Permissions,
pub steps: Steps,
pub timed_out: bool,
pub waiting: bool,
}Expand description
One resolved permission set (cp or chp).
Fields§
§effective: PermissionsThe effective permissions after step 7. Always a subset of KNOWN.
grants: PermissionsThe grants of steps 1–6 (after dependencies), before any restriction.
before_lockdown: PermissionsThe permissions after steps 7a–7b but before the lockdown (7c) and the locked flag
(7d). H3 for lockdown management compares against this, so a lockdown never prevents
its own management.
steps: StepsWhat each restriction removed.
timed_out: boolWhether step 7a applied.
waiting: boolWhether the waiting period applied.
Implementations§
Source§impl Resolved
impl Resolved
Sourcepub fn unrestricted(p: Permissions) -> Self
pub fn unrestricted(p: Permissions) -> Self
A result with no restriction (owner, or a member the state gate zeroes).
Sourcepub const fn has(&self, bits: Permissions) -> bool
pub const fn has(&self, bits: Permissions) -> bool
Whether every bit of bits is effective.
Sourcepub fn require(&self, bits: Permissions) -> Result<(), Denial>
pub fn require(&self, bits: Permissions) -> Result<(), Denial>
Ok when every bit of bits is effective, else a denial naming the missing bits.
Sourcepub fn require_any(&self, bits: Permissions) -> Result<(), Denial>
pub fn require_any(&self, bits: Permissions) -> Result<(), Denial>
Ok when at least one bit of bits is effective (or bits is empty).
Sourcepub fn explain(&self, missing: Permissions) -> Denial
pub fn explain(&self, missing: Permissions) -> Denial
Attributes missing bits to a restriction. A reason is given only when the restrictions are the whole cause (every missing bit was granted); then it names the first step, in order 7a–7d, that removed one of them or its prerequisite.