pub struct DenyDetails {
pub tool_name: Option<String>,
pub tool_server: Option<String>,
pub requested_action: Option<String>,
pub required_scope: Option<String>,
pub granted_scope: Option<String>,
pub reason_code: Option<String>,
pub receipt_id: Option<String>,
pub hint: Option<String>,
pub docs_url: Option<String>,
}Expand description
Structured deny context attached to Verdict::Deny.
Every field is optional. Callers that only know a reason and a guard
can continue to use Verdict::deny; callers with richer context
should prefer Verdict::deny_detailed or build a DenyDetails
directly and pass it to the struct variant.
Fields§
§tool_name: Option<String>Tool name that was denied, e.g. "write_file".
tool_server: Option<String>Tool server that hosts the denied tool, e.g. "filesystem".
requested_action: Option<String>Short human-readable summary of the attempted action, suitable for
inclusion in an error line. Example: write_file(path=".env").
required_scope: Option<String>Scope the kernel says is required to perform the action, rendered
as the SDK’s canonical ToolGrant(...) string.
granted_scope: Option<String>Scope the presented capability actually had, same rendering as
required_scope. None when no capability was presented.
reason_code: Option<String>Stable machine-readable code for this denial, e.g.
"scope.missing", "guard.prompt_injection", "tenant.mismatch".
receipt_id: Option<String>Receipt id that captures this denial, for audit correlation.
hint: Option<String>Next-steps sentence shown to the developer. Example: "Request scope filesystem::write_file from the capability authority.".
docs_url: Option<String>Link to the docs page that explains this deny code.
Implementations§
Trait Implementations§
Source§impl Clone for DenyDetails
impl Clone for DenyDetails
Source§fn clone(&self) -> DenyDetails
fn clone(&self) -> DenyDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DenyDetails
impl Debug for DenyDetails
Source§impl Default for DenyDetails
impl Default for DenyDetails
Source§fn default() -> DenyDetails
fn default() -> DenyDetails
Source§impl<'de> Deserialize<'de> for DenyDetails
impl<'de> Deserialize<'de> for DenyDetails
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>,
Source§impl PartialEq for DenyDetails
impl PartialEq for DenyDetails
Source§impl Serialize for DenyDetails
impl Serialize for DenyDetails
impl Eq for DenyDetails
impl StructuralPartialEq for DenyDetails
Auto Trait Implementations§
impl Freeze for DenyDetails
impl RefUnwindSafe for DenyDetails
impl Send for DenyDetails
impl Sync for DenyDetails
impl Unpin for DenyDetails
impl UnsafeUnpin for DenyDetails
impl UnwindSafe for DenyDetails
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.