pub struct AsyncRoleSystemBuilder<S>{ /* private fields */ }Expand description
Async role system builder for easy configuration.
Implementations§
Source§impl<S> AsyncRoleSystemBuilder<S>
impl<S> AsyncRoleSystemBuilder<S>
Source§impl<S> AsyncRoleSystemBuilder<S>
impl<S> AsyncRoleSystemBuilder<S>
Sourcepub fn with_storage(storage: S) -> Self
pub fn with_storage(storage: S) -> Self
Create a new builder with custom storage.
Sourcepub fn config(self, config: RoleSystemConfig) -> Self
pub fn config(self, config: RoleSystemConfig) -> Self
Set the configuration.
Sourcepub fn max_hierarchy_depth(self, depth: usize) -> Self
pub fn max_hierarchy_depth(self, depth: usize) -> Self
Set the maximum hierarchy depth.
Sourcepub fn enable_caching(self, enabled: bool) -> Self
pub fn enable_caching(self, enabled: bool) -> Self
Enable or disable permission caching.
Sourcepub fn cache_ttl_seconds(self, ttl: u64) -> Self
pub fn cache_ttl_seconds(self, ttl: u64) -> Self
Set the cache TTL in seconds.
Sourcepub fn enable_audit(self, enabled: bool) -> Self
pub fn enable_audit(self, enabled: bool) -> Self
Enable or disable audit logging.
Sourcepub fn build(self) -> AsyncRoleSystem<S>where
S: Default,
pub fn build(self) -> AsyncRoleSystem<S>where
S: Default,
Build the async role system.
Sourcepub fn build_with_storage(self, storage: S) -> AsyncRoleSystem<S>
pub fn build_with_storage(self, storage: S) -> AsyncRoleSystem<S>
Build the async role system with provided storage.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for AsyncRoleSystemBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for AsyncRoleSystemBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for AsyncRoleSystemBuilder<S>
impl<S> Sync for AsyncRoleSystemBuilder<S>
impl<S> Unpin for AsyncRoleSystemBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for AsyncRoleSystemBuilder<S>where
S: UnwindSafe,
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