pub struct PermissionConfig {
pub strategy: Arc<dyn PermissionStrategy>,
pub store: Arc<dyn PermissionStore>,
pub prompt: Arc<dyn PromptHandler>,
pub audit: Arc<dyn AuditSink>,
pub trust_flags: TrustFlagConfig,
}Expand description
Complete permission configuration bundle
Fields§
§strategy: Arc<dyn PermissionStrategy>Permission checking strategy
store: Arc<dyn PermissionStore>Permission storage
prompt: Arc<dyn PromptHandler>User prompt handler
audit: Arc<dyn AuditSink>Audit sink
trust_flags: TrustFlagConfigTrust flag configuration
Implementations§
Source§impl PermissionConfig
impl PermissionConfig
Sourcepub fn new(
strategy: impl PermissionStrategy + 'static,
store: impl PermissionStore + 'static,
prompt: impl PromptHandler + 'static,
audit: impl AuditSink + 'static,
trust_flags: TrustFlagConfig,
) -> Self
pub fn new( strategy: impl PermissionStrategy + 'static, store: impl PermissionStore + 'static, prompt: impl PromptHandler + 'static, audit: impl AuditSink + 'static, trust_flags: TrustFlagConfig, ) -> Self
Create a new configuration with custom components
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PermissionConfig
impl !RefUnwindSafe for PermissionConfig
impl Send for PermissionConfig
impl Sync for PermissionConfig
impl Unpin for PermissionConfig
impl !UnwindSafe for PermissionConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more