#[non_exhaustive]pub enum PermissionRequestKind {
Shell,
Write,
Read,
Url,
Mcp,
CustomTool,
Memory,
Hook,
Unknown,
}Expand description
Permission categories the CLI may request approval for.
Wire values are the lower-kebab strings the CLI sends as the kind
discriminator on a permission request. Marked #[non_exhaustive]
because the CLI may add new kinds; matches must include a _ arm.
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.
Shell
Run a shell command.
Write
Write to a file.
Read
Read a file.
Url
Open a URL.
Mcp
Invoke an MCP server tool.
CustomTool
Invoke a client-defined custom tool.
Memory
Update agent memory.
Hook
Run a hook callback.
Unknown
Unrecognized kind. The original wire string is available in
PermissionRequestData::extra under the kind key.
Trait Implementations§
Source§impl Clone for PermissionRequestKind
impl Clone for PermissionRequestKind
Source§fn clone(&self) -> PermissionRequestKind
fn clone(&self) -> PermissionRequestKind
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 PermissionRequestKind
impl Debug for PermissionRequestKind
Source§impl<'de> Deserialize<'de> for PermissionRequestKind
impl<'de> Deserialize<'de> for PermissionRequestKind
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
Source§impl Hash for PermissionRequestKind
impl Hash for PermissionRequestKind
Source§impl PartialEq for PermissionRequestKind
impl PartialEq for PermissionRequestKind
Source§fn eq(&self, other: &PermissionRequestKind) -> bool
fn eq(&self, other: &PermissionRequestKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PermissionRequestKind
impl Serialize for PermissionRequestKind
impl Copy for PermissionRequestKind
impl Eq for PermissionRequestKind
impl StructuralPartialEq for PermissionRequestKind
Auto Trait Implementations§
impl Freeze for PermissionRequestKind
impl RefUnwindSafe for PermissionRequestKind
impl Send for PermissionRequestKind
impl Sync for PermissionRequestKind
impl Unpin for PermissionRequestKind
impl UnsafeUnpin for PermissionRequestKind
impl UnwindSafe for PermissionRequestKind
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