Enum gix_sec::Permission
source · 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<Permission> for Permission
impl PartialEq<Permission> for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Permission> for Permission
impl PartialOrd<Permission> for Permission
source§fn partial_cmp(&self, other: &Permission) -> Option<Ordering>
fn partial_cmp(&self, other: &Permission) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for Permission
impl Serialize for Permission
impl Copy for Permission
impl Eq for Permission
impl StructuralEq for Permission
impl StructuralPartialEq for Permission
Auto Trait Implementations§
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