pub struct Grants {
pub roles: BTreeSet<String>,
pub permissions: BTreeSet<String>,
}Expand description
The roles and permissions one person holds, in one tenant.
Fields§
§roles: BTreeSet<String>Role names held.
permissions: BTreeSet<String>Permission strings held, as stored.
Implementations§
Source§impl Grants
impl Grants
Sourcepub fn new<R, P>(roles: R, permissions: P) -> Self
pub fn new<R, P>(roles: R, permissions: P) -> Self
Grants from role names and permission strings.
Holds everything: an authority role by name, or the god permission.
Trait Implementations§
impl Eq for Grants
impl StructuralPartialEq for Grants
Auto Trait Implementations§
impl Freeze for Grants
impl RefUnwindSafe for Grants
impl Send for Grants
impl Sync for Grants
impl Unpin for Grants
impl UnsafeUnpin for Grants
impl UnwindSafe for Grants
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