#[non_exhaustive]pub struct RolePolicy {
pub scope_kinds: Vec<String>,
pub roles: Vec<Role>,
pub rules: Vec<Rule>,
pub limits: RoleLimits,
}Expand description
A role policy as plain data: what RoleAuthorizer::new checks and compiles.
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.scope_kinds: Vec<String>The kinds a rule scope may use (site allows site:north); empty allows any kind.
* is always allowed.
roles: Vec<Role>The roles.
rules: Vec<Rule>The rules, in the order they are tried.
limits: RoleLimitsBounds on the policy’s size; RoleLimits::default when absent.
Implementations§
Source§impl RolePolicy
impl RolePolicy
Trait Implementations§
Source§impl Clone for RolePolicy
impl Clone for RolePolicy
Source§impl Debug for RolePolicy
impl Debug for RolePolicy
Source§impl Default for RolePolicy
impl Default for RolePolicy
Source§impl Describe for RolePolicy
impl Describe for RolePolicy
impl Eq for RolePolicy
impl Fields for RolePolicy
Source§impl Inspect for RolePolicy
impl Inspect for RolePolicy
Source§impl PartialEq for RolePolicy
impl PartialEq for RolePolicy
impl StructuralPartialEq for RolePolicy
Source§impl TryFrom<RolePolicy> for RoleAuthorizer
impl TryFrom<RolePolicy> for RoleAuthorizer
Source§type Error = RolePolicyError
type Error = RolePolicyError
The type returned in the event of a conversion error.
Source§fn try_from(policy: RolePolicy) -> Result<Self, RolePolicyError>
fn try_from(policy: RolePolicy) -> Result<Self, RolePolicyError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RolePolicy
impl RefUnwindSafe for RolePolicy
impl Send for RolePolicy
impl Sync for RolePolicy
impl Unpin for RolePolicy
impl UnsafeUnpin for RolePolicy
impl UnwindSafe for RolePolicy
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