pub struct TrustAllStrategy { /* private fields */ }Expand description
Trust-all strategy (DANGEROUS - for development only)
- Allows all capabilities without prompt
- Should only be used in development/testing
§Warning
This strategy bypasses ALL permission checks. Only use in:
- Local development environments
- Controlled testing scenarios
- Never in production or with untrusted plugins
Implementations§
Source§impl TrustAllStrategy
impl TrustAllStrategy
Sourcepub fn new_dangerous() -> Self
pub fn new_dangerous() -> Self
Create a new trust-all strategy
§Warning
This strategy bypasses all permission checks. Only use in controlled environments. The returned value must be used - ignoring it likely indicates a bug.
Trait Implementations§
Source§impl Debug for TrustAllStrategy
impl Debug for TrustAllStrategy
Source§impl PermissionStrategy for TrustAllStrategy
impl PermissionStrategy for TrustAllStrategy
Source§fn granularity(&self) -> PermissionGranularity
fn granularity(&self) -> PermissionGranularity
Get the granularity level for permission checks
Source§fn inherit_capabilities(&self) -> bool
fn inherit_capabilities(&self) -> bool
Whether subcommands inherit parent command’s capabilities
Source§fn check(&self, _ctx: &PermissionContext<'_>) -> PermissionDecision
fn check(&self, _ctx: &PermissionContext<'_>) -> PermissionDecision
Check permission and return decision
Source§fn on_escalation(&self, _ctx: &PermissionContext<'_>) -> PermissionDecision
fn on_escalation(&self, _ctx: &PermissionContext<'_>) -> PermissionDecision
Called when capabilities escalation is detected (plugin updated with more permissions)
Auto Trait Implementations§
impl Freeze for TrustAllStrategy
impl RefUnwindSafe for TrustAllStrategy
impl Send for TrustAllStrategy
impl Sync for TrustAllStrategy
impl Unpin for TrustAllStrategy
impl UnwindSafe for TrustAllStrategy
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