pub struct Policy {
pub permission: Permission,
pub resources: Resources,
}Expand description
Represents a policy string in the format “Permission:Resource1,Resource2,…”.
§Fields
permission- The permission associated with the policy.resources- The resources associated with the policy.
Fields§
§permission: Permission§resources: ResourcesTrait Implementations§
Source§impl Ord for Policy
impl Ord for Policy
Source§impl PartialOrd for Policy
impl PartialOrd for Policy
Source§impl<T> PermissionChecker<T> for Policy
impl<T> PermissionChecker<T> for Policy
Source§fn has_permission(&self, permission: &Permission, resource_path: T) -> bool
fn has_permission(&self, permission: &Permission, resource_path: T) -> bool
Checks if a permission is granted on a resource. Read more
Source§impl<T> PermissionCheckerAny<T> for Policy
impl<T> PermissionCheckerAny<T> for Policy
Source§fn has_permission_any(
&self,
permission: &Permission,
resources_path: &[T],
) -> bool
fn has_permission_any( &self, permission: &Permission, resources_path: &[T], ) -> bool
Checks if a permission is granted on any of the given resources. Read more
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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