Struct permissions::Lockdown
zaun_community_protocol::permissions::Lockdown · Struct
pub struct Lockdown { … }The community’s lockdown row.
Fields
Section titled “Fields”restrictions: LockdownRestrictions
Section titled “restrictions: LockdownRestrictions”The named restrictions.
expires_at_ms: u64
Section titled “expires_at_ms: u64”Expiry in ms since the epoch; the lockdown is active while now < expires_at_ms.
newcomer_window_ms: u64
Section titled “newcomer_window_ms: u64”newcomer_window_s in ms: restrict_newcomers covers members admitted this recently.
Methods
Section titled “Methods”is_active
Section titled “is_active”pub const fn is_active(&self, now_ms: u64) -> boolWhether the lockdown is in force at now_ms.
limits_expensive
Section titled “limits_expensive”pub const fn limits_expensive(&self, is_owner: bool, now_ms: u64) -> boolWhether restrict_expensive binds a member at now_ms: the lockdown is in force,
names it, and the member is not the owner (the only exemption, ADR-0016).
max_mask
Section titled “max_mask”pub fn max_mask(restrictions: LockdownRestrictions, newcomers: Permissions) -> PermissionsThe whole permission mask the lockdown can remove from anyone, given the policy’s newcomer mask. H3 checks a lockdown enable against this (permissions the protocol).
mask_for
Section titled “mask_for”pub fn mask_for(&self, admitted_at_ms: u64, newcomers: Permissions, now_ms: u64) -> PermissionsThe mask for one member admitted at admitted_at_ms; empty once expired.
Trait implementations
Section titled “Trait implementations”Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq