pub struct RbacAdapter {
pub subject_roles: HashMap<String, HashSet<String>>,
pub role_permissions: HashMap<String, HashSet<(String, String)>>,
}Available on crate feature
enterprise only.Expand description
Fields§
§subject_roles: HashMap<String, HashSet<String>>Subject -> role set map.
role_permissions: HashMap<String, HashSet<(String, String)>>Role -> allowed (resource, action) tuples.
Implementations§
Trait Implementations§
Source§impl AuthorizationEngine for RbacAdapter
impl AuthorizationEngine for RbacAdapter
Source§fn evaluate(&self, context: &AuthorizationContext) -> AuthorizationDecision
fn evaluate(&self, context: &AuthorizationContext) -> AuthorizationDecision
Evaluates access for a given request context.
Source§impl Clone for RbacAdapter
impl Clone for RbacAdapter
Source§fn clone(&self) -> RbacAdapter
fn clone(&self) -> RbacAdapter
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 RbacAdapter
impl Debug for RbacAdapter
Source§impl Default for RbacAdapter
impl Default for RbacAdapter
Source§fn default() -> RbacAdapter
fn default() -> RbacAdapter
Returns the “default value” for a type. Read more
Source§impl PartialEq for RbacAdapter
impl PartialEq for RbacAdapter
impl Eq for RbacAdapter
impl StructuralPartialEq for RbacAdapter
Auto Trait Implementations§
impl Freeze for RbacAdapter
impl RefUnwindSafe for RbacAdapter
impl Send for RbacAdapter
impl Sync for RbacAdapter
impl Unpin for RbacAdapter
impl UnsafeUnpin for RbacAdapter
impl UnwindSafe for RbacAdapter
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.