pub enum PermissionCode {
PathNotAllowed,
CommandNotAllowed,
NetworkNotAllowed,
ServerNotTrusted,
AuthScopeNotAllowed,
CustomPolicyDenied,
UnknownRequest,
}Expand description
Machine-readable code indicating why a permission was denied.
Returned inside a PermissionDenial so callers can programmatically
react to specific denial categories.
Variants§
PathNotAllowed
A filesystem path is outside the allowed set.
CommandNotAllowed
A shell command or executable is not permitted.
NetworkNotAllowed
A network operation is not permitted.
ServerNotTrusted
An MCP server is not in the trusted set.
AuthScopeNotAllowed
An MCP auth scope is not in the allowed set.
CustomPolicyDenied
A custom permission policy explicitly denied the request.
UnknownRequest
No policy recognised the request kind.
Trait Implementations§
Source§impl Clone for PermissionCode
impl Clone for PermissionCode
Source§fn clone(&self) -> PermissionCode
fn clone(&self) -> PermissionCode
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 PermissionCode
impl Debug for PermissionCode
Source§impl<'de> Deserialize<'de> for PermissionCode
impl<'de> Deserialize<'de> for PermissionCode
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 PartialEq for PermissionCode
impl PartialEq for PermissionCode
Source§impl Serialize for PermissionCode
impl Serialize for PermissionCode
impl Eq for PermissionCode
impl StructuralPartialEq for PermissionCode
Auto Trait Implementations§
impl Freeze for PermissionCode
impl RefUnwindSafe for PermissionCode
impl Send for PermissionCode
impl Sync for PermissionCode
impl Unpin for PermissionCode
impl UnsafeUnpin for PermissionCode
impl UnwindSafe for PermissionCode
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