pub struct MapPermissionSet { /* private fields */ }Expand description
Set of user permissions.
Implementations§
Source§impl PermissionSet
impl PermissionSet
Sourcepub fn new() -> PermissionSet
pub fn new() -> PermissionSet
Constructs new permission set.
Sourcepub fn is_allowed(&self, action: Action) -> bool
pub fn is_allowed(&self, action: Action) -> bool
Is the given action allowed according to this permission set?
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 Default for PermissionSet
impl Default for PermissionSet
Source§fn default() -> PermissionSet
fn default() -> PermissionSet
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PermissionSet
impl<'de> Deserialize<'de> for PermissionSet
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 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
Source§impl Serialize for PermissionSet
impl Serialize for PermissionSet
Source§impl TryFrom<QueryResponse> for MapPermissionSet
impl TryFrom<QueryResponse> for MapPermissionSet
Source§type Error = TryFromError
type Error = TryFromError
The type returned in the event of a conversion error.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more