pub struct PermissionRequestData {
pub kind: Option<PermissionRequestKind>,
pub tool_call_id: Option<String>,
pub extra: Value,
}Expand description
Data sent by the CLI for permission-related events.
Used for both the permission.request RPC call (which expects a response)
and permission.requested notifications (fire-and-forget). Contains the
full params object. Note that requestId is also available as a separate
field on HandlerEvent::PermissionRequest.
Fields§
§kind: Option<PermissionRequestKind>The permission category being requested. None means the CLI did
not include a kind field. Use this to branch on common cases
(shell, write, etc.) without parsing extra.
tool_call_id: Option<String>The originating tool-call ID, if this permission request is tied to a specific tool invocation.
extra: ValueThe full permission request params from the CLI. The shape varies by
permission type and CLI version, so we preserve it as Value.
Trait Implementations§
Source§impl Clone for PermissionRequestData
impl Clone for PermissionRequestData
Source§fn clone(&self) -> PermissionRequestData
fn clone(&self) -> PermissionRequestData
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 moreSource§impl Debug for PermissionRequestData
impl Debug for PermissionRequestData
Source§impl Default for PermissionRequestData
impl Default for PermissionRequestData
Source§fn default() -> PermissionRequestData
fn default() -> PermissionRequestData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PermissionRequestData
impl<'de> Deserialize<'de> for PermissionRequestData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PermissionRequestData
impl RefUnwindSafe for PermissionRequestData
impl Send for PermissionRequestData
impl Sync for PermissionRequestData
impl Unpin for PermissionRequestData
impl UnsafeUnpin for PermissionRequestData
impl UnwindSafe for PermissionRequestData
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