Struct permissions::Resolved
zaun_community_protocol::permissions::Resolved · Struct
pub struct Resolved { … }One resolved permission set (cp or chp).
Fields
Section titled “Fields”effective: Permissions
Section titled “effective: Permissions”The effective permissions after step 7. Always a subset of KNOWN.
grants: Permissions
Section titled “grants: Permissions”The grants of steps 1–6 (after dependencies), before any restriction.
before_lockdown: Permissions
Section titled “before_lockdown: Permissions”The 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: Steps
Section titled “steps: Steps”What each restriction removed.
timed_out: bool
Section titled “timed_out: bool”Whether step 7a applied.
waiting: bool
Section titled “waiting: bool”Whether the waiting period applied.
Methods
Section titled “Methods”unrestricted
Section titled “unrestricted”pub fn unrestricted(p: Permissions) -> SelfA result with no restriction (owner, or a member the state gate zeroes).
pub const fn has(&self, bits: Permissions) -> boolWhether every bit of bits is effective.
require
Section titled “require”pub fn require(&self, bits: Permissions) -> Result<(), Denial>Ok when every bit of bits is effective, else a denial naming the missing bits.
require_any
Section titled “require_any”pub fn require_any(&self, bits: Permissions) -> Result<(), Denial>Ok when at least one bit of bits is effective (or bits is empty).
explain
Section titled “explain”pub fn explain(&self, missing: Permissions) -> DenialAttributes 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.
Trait implementations
Section titled “Trait implementations”Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq