#[non_exhaustive]pub struct RoleLimits {
pub roles: Limit,
pub actions_per_role: Limit,
pub rules: Limit,
pub scope_kinds: Limit,
pub name_bytes: Limit,
pub ancestors: Limit,
}Expand description
Bounds on a policy, each a [Limit] the caller can change or lift ([Limit::UNBOUNDED]).
They bound the work and memory a policy costs, not who may do what: the rule scan per request, and the tables built once. By default at most 256 roles, 256 actions per role, 10 000 rules, 64 scope kinds, names of 256 bytes, and 64 ancestors in one request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.roles: LimitRoles a policy defines.
actions_per_role: LimitActions one role lists.
rules: LimitRules a policy holds.
scope_kinds: LimitScope kinds a policy allows.
name_bytes: LimitBytes in a role, action, subject value, scope kind or scope id.
ancestors: LimitAncestors one request names; a request naming more is an error, never a denial.
Implementations§
Source§impl RoleLimits
impl RoleLimits
Sourcepub const fn actions_per_role(self, actions: Limit) -> Self
pub const fn actions_per_role(self, actions: Limit) -> Self
These limits with actions_per_role.
Sourcepub const fn scope_kinds(self, kinds: Limit) -> Self
pub const fn scope_kinds(self, kinds: Limit) -> Self
These limits with scope_kinds.
Sourcepub const fn name_bytes(self, bytes: Limit) -> Self
pub const fn name_bytes(self, bytes: Limit) -> Self
These limits with name_bytes.
Trait Implementations§
Source§impl Clone for RoleLimits
impl Clone for RoleLimits
impl Copy for RoleLimits
Source§impl Debug for RoleLimits
impl Debug for RoleLimits
Source§impl Default for RoleLimits
impl Default for RoleLimits
Source§impl Describe for RoleLimits
impl Describe for RoleLimits
impl Eq for RoleLimits
impl Fields for RoleLimits
Source§impl Inspect for RoleLimits
impl Inspect for RoleLimits
Source§impl PartialEq for RoleLimits
impl PartialEq for RoleLimits
impl StructuralPartialEq for RoleLimits
Auto Trait Implementations§
impl Freeze for RoleLimits
impl RefUnwindSafe for RoleLimits
impl Send for RoleLimits
impl Sync for RoleLimits
impl Unpin for RoleLimits
impl UnsafeUnpin for RoleLimits
impl UnwindSafe for RoleLimits
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