pub enum GuardDecision {
Granted,
Refused(GuardRefusal),
}Expand description
Outcome of guarding an action: granted or refused with a reason.
Variants§
Granted
The action is permitted.
Refused(GuardRefusal)
The action is denied, carrying the refusal record.
Implementations§
Source§impl GuardDecision
impl GuardDecision
Sourcepub fn is_granted(&self) -> bool
pub fn is_granted(&self) -> bool
Returns true when the action was granted.
Sourcepub fn refusal(&self) -> Option<&GuardRefusal>
pub fn refusal(&self) -> Option<&GuardRefusal>
Returns the refusal record when the action was refused.
Trait Implementations§
Source§impl Clone for GuardDecision
impl Clone for GuardDecision
Source§fn clone(&self) -> GuardDecision
fn clone(&self) -> GuardDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GuardDecision
impl Debug for GuardDecision
impl Eq for GuardDecision
Source§impl PartialEq for GuardDecision
impl PartialEq for GuardDecision
Source§fn eq(&self, other: &GuardDecision) -> bool
fn eq(&self, other: &GuardDecision) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GuardDecision
Auto Trait Implementations§
impl Freeze for GuardDecision
impl RefUnwindSafe for GuardDecision
impl Send for GuardDecision
impl Sync for GuardDecision
impl Unpin for GuardDecision
impl UnsafeUnpin for GuardDecision
impl UnwindSafe for GuardDecision
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