pub struct Denial {
pub missing: Permissions,
pub reason: Option<DenialReason>,
}Expand description
A failed permission or hierarchy check.
Fields§
§missing: PermissionsRequired bits the actor lacks; empty when a non-bit rule failed.
reason: Option<DenialReason>The rule that caused it, when the bits were granted but then restricted, or when a hierarchy rule failed.
Implementations§
Source§impl Denial
impl Denial
Sourcepub const fn missing(bits: Permissions) -> Self
pub const fn missing(bits: Permissions) -> Self
A denial for missing bits with no specific cause.
Sourcepub const fn error_code(&self) -> ErrorCode
pub const fn error_code(&self) -> ErrorCode
The response code: TIMED_OUT when the timeout caused it (specification §8
preamble), otherwise FORBIDDEN.
Trait Implementations§
impl Copy for Denial
impl Eq for Denial
impl StructuralPartialEq for Denial
Auto Trait Implementations§
impl Freeze for Denial
impl RefUnwindSafe for Denial
impl Send for Denial
impl Sync for Denial
impl Unpin for Denial
impl UnsafeUnpin for Denial
impl UnwindSafe for Denial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more