pub enum PermissionDecision {
Allow {
updated_input: Option<Value>,
},
Deny {
message: String,
},
Defer,
}Expand description
The decision returned from a PermissionHandler (or passed to
DuplexSession::respond_to_permission for deferred decisions).
Allow and Deny both write a control response to the CLI
immediately. Defer causes the run loop to skip writing a
response; the caller is then expected to invoke
DuplexSession::respond_to_permission later. Passing Defer
to respond_to_permission is a no-op.
Variants§
Allow
Allow the tool to run, optionally with rewritten input.
Fields
Deny
Deny the tool. The message is surfaced to the model.
Defer
Decision pending; the caller will supply it later via
DuplexSession::respond_to_permission.
Trait Implementations§
Source§impl Clone for PermissionDecision
impl Clone for PermissionDecision
Source§fn clone(&self) -> PermissionDecision
fn clone(&self) -> PermissionDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PermissionDecision
impl RefUnwindSafe for PermissionDecision
impl Send for PermissionDecision
impl Sync for PermissionDecision
impl Unpin for PermissionDecision
impl UnsafeUnpin for PermissionDecision
impl UnwindSafe for PermissionDecision
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