pub struct PermissionSet(/* private fields */);Expand description
A validated compact set of explicit permissions.
Implementations§
Source§impl PermissionSet
impl PermissionSet
pub const fn empty() -> Self
pub const fn all() -> Self
pub fn from_permissions(permissions: &[Permission]) -> Self
pub const fn from_bits(bits: u16) -> Result<Self, AuthorityError>
pub const fn bits(self) -> u16
pub const fn contains(self, permission: Permission) -> bool
pub const fn contains_all(self, permissions: Self) -> bool
Trait Implementations§
Source§impl Clone for PermissionSet
impl Clone for PermissionSet
Source§fn clone(&self) -> PermissionSet
fn clone(&self) -> PermissionSet
Returns a duplicate 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 PermissionSet
impl Debug for PermissionSet
Source§impl Hash for PermissionSet
impl Hash for PermissionSet
Source§impl Ord for PermissionSet
impl Ord for PermissionSet
Source§fn cmp(&self, other: &PermissionSet) -> Ordering
fn cmp(&self, other: &PermissionSet) -> 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 PermissionSet
impl PartialEq for PermissionSet
Source§impl PartialOrd for PermissionSet
impl PartialOrd for PermissionSet
impl Copy for PermissionSet
impl Eq for PermissionSet
impl StructuralPartialEq for PermissionSet
Auto Trait Implementations§
impl Freeze for PermissionSet
impl RefUnwindSafe for PermissionSet
impl Send for PermissionSet
impl Sync for PermissionSet
impl Unpin for PermissionSet
impl UnwindSafe for PermissionSet
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