Skip to content

Struct permissions::Resolver

zaun_community_protocol::permissions::Resolver · Struct

pub struct Resolver<'a> { … }

Per-member state computed once; then Resolver::community and Resolver::channel are cheap enough to call for every channel of a snapshot.

pub const fn base(&self) -> Permissions

base(m) (steps 1–2), before any restriction; empty for a non-admitted member.

pub const fn is_owner(&self) -> bool

Whether the member is the owner.

pub const fn is_admin(&self) -> bool

Whether the member holds ADMINISTRATOR (and is admitted); false for the owner.

pub const fn is_timed_out(&self) -> bool

Whether step 7a applies (never to the owner or an administrator).

pub const fn in_waiting_period(&self) -> bool

Whether the admission policy’s waiting period still applies.

pub fn party(&self) -> Party

The member as the management hierarchy sees it.

pub fn new(subject: Subject<'a>, ctx: &Context<'_>) -> Self

Phase one: the membership gate, base(m) and the member’s restriction masks.

pub fn community(&self) -> Resolved

community_permissions(m, ctx): cp(A) of the protocol

pub fn channel(&self, ch: &Channel<'_>) -> Resolved

channel_permissions(m, ch, ctx): chp(A, ch) of the protocol

Clone, Copy, Debug

Full rustdoc page