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