pub enum Permission {
Forbid,
Deny,
Allow,
}
Expand description
Allow, deny or forbid using a resource or performing an action.
Variants§
Forbid
Fail outright when trying to load a resource or performing an action.
Deny
Ignore resources or try to avoid performing an operation.
Allow
Allow loading a resource or performing an action.
Implementations§
source§impl Permission
impl Permission
sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Return true if this instance is Permission::Allow
.
Trait Implementations§
source§impl Clone for Permission
impl Clone for Permission
source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
Returns a copy of the value. Read more
1.0.0 · 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 Permission
impl Debug for Permission
source§impl<'de> Deserialize<'de> for Permission
impl<'de> Deserialize<'de> for Permission
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Permission
impl Hash for Permission
source§impl Ord for Permission
impl Ord for Permission
source§fn cmp(&self, other: &Permission) -> Ordering
fn cmp(&self, other: &Permission) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Permission
impl PartialEq for Permission
source§impl PartialOrd for Permission
impl PartialOrd for Permission
source§impl Serialize for Permission
impl Serialize for Permission
impl Copy for Permission
impl Eq for Permission
impl StructuralPartialEq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl Send for Permission
impl Sync for Permission
impl Unpin for Permission
impl UnwindSafe for Permission
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)