pub struct RoleAuthorizerBuilder { /* private fields */ }Expand description
Builds a RoleAuthorizer; rules are tried in the order they are added.
Implementations§
Source§impl RoleAuthorizerBuilder
impl RoleAuthorizerBuilder
Sourcepub fn scope_kinds(
self,
kinds: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn scope_kinds( self, kinds: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Allows these scope kinds in rules; without any, every kind is allowed.
Sourcepub fn role(
self,
name: impl Into<String>,
actions: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn role( self, name: impl Into<String>, actions: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Defines a role.
Sourcepub fn limits(self, limits: RoleLimits) -> Self
pub fn limits(self, limits: RoleLimits) -> Self
Bounds the policy’s size. Default RoleLimits::default.
Sourcepub fn build(self) -> Result<RoleAuthorizer, RolePolicyError>
pub fn build(self) -> Result<RoleAuthorizer, RolePolicyError>
Trait Implementations§
Source§impl Clone for RoleAuthorizerBuilder
impl Clone for RoleAuthorizerBuilder
Source§impl Debug for RoleAuthorizerBuilder
impl Debug for RoleAuthorizerBuilder
Auto Trait Implementations§
impl Freeze for RoleAuthorizerBuilder
impl RefUnwindSafe for RoleAuthorizerBuilder
impl Send for RoleAuthorizerBuilder
impl Sync for RoleAuthorizerBuilder
impl Unpin for RoleAuthorizerBuilder
impl UnsafeUnpin for RoleAuthorizerBuilder
impl UnwindSafe for RoleAuthorizerBuilder
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