Skip to content

Struct permissions::Denial

zaun_community_protocol::permissions::Denial · Struct

pub struct Denial { … }

A failed permission or hierarchy check.

Required bits the actor lacks; empty when a non-bit rule failed.

The rule that caused it, when the bits were granted but then restricted, or when a hierarchy rule failed.

pub const fn hierarchy() -> Self

A hierarchy denial (H1, H2, H4).

pub const fn missing(bits: Permissions) -> Self

A denial for missing bits with no specific cause.

pub const fn error_code(&self) -> ErrorCode

The response code: TIMED_OUT when the timeout caused it, otherwise FORBIDDEN.

Clone, Copy, Debug, Eq, From<Denial>, Hash, PartialEq, StructuralPartialEq

Full rustdoc page