#[non_exhaustive]pub enum ApprovalMode {
Enabled,
Smart,
Bypassed,
}Expand description
Controls whether the approval gate is active.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Enabled
Every tool call goes through the approval callback.
Smart
Auto-approve read-only tools (where requires_approval() returns false);
prompt for all others. Supports per-tool session trust.
Bypassed
All tool calls auto-approved — callback is never called. Use this to temporarily disable approval without removing the callback.
Trait Implementations§
Source§impl Clone for ApprovalMode
impl Clone for ApprovalMode
Source§fn clone(&self) -> ApprovalMode
fn clone(&self) -> ApprovalMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApprovalMode
impl Debug for ApprovalMode
Source§impl Default for ApprovalMode
impl Default for ApprovalMode
Source§fn default() -> ApprovalMode
fn default() -> ApprovalMode
Returns the “default value” for a type. Read more
Source§impl From<ApprovalMode> for ApprovalModeConfig
impl From<ApprovalMode> for ApprovalModeConfig
Source§fn from(m: ApprovalMode) -> Self
fn from(m: ApprovalMode) -> Self
Converts to this type from the input type.
Source§impl From<ApprovalModeConfig> for ApprovalMode
impl From<ApprovalModeConfig> for ApprovalMode
Source§fn from(m: ApprovalModeConfig) -> Self
fn from(m: ApprovalModeConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ApprovalMode
impl PartialEq for ApprovalMode
impl Copy for ApprovalMode
impl Eq for ApprovalMode
impl StructuralPartialEq for ApprovalMode
Auto Trait Implementations§
impl Freeze for ApprovalMode
impl RefUnwindSafe for ApprovalMode
impl Send for ApprovalMode
impl Sync for ApprovalMode
impl Unpin for ApprovalMode
impl UnsafeUnpin for ApprovalMode
impl UnwindSafe for ApprovalMode
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