pub struct GuardedToolCall {
pub request: ToolCallRequest,
pub action: Option<String>,
pub resource: Option<String>,
pub verdict: ToolCallVerdict,
}Expand description
A tool call together with its resolved binding and verdict.
Fields§
§request: ToolCallRequestThe normalized call that was checked.
action: Option<String>The Typesec action the call was checked as (absent for unbound tools).
resource: Option<String>The resolved resource id (absent for unbound tools or failed resource-argument resolution).
verdict: ToolCallVerdictThe verdict.
Implementations§
Source§impl GuardedToolCall
impl GuardedToolCall
Sourcepub fn denial_message(&self) -> Option<String>
pub fn denial_message(&self) -> Option<String>
Human-readable denial text for feeding back to the model, or None
when the call is allowed.
Source§impl GuardedToolCall
impl GuardedToolCall
Sourcepub fn protect_output<L: PrivacyLevel, T>(
&self,
output: T,
) -> Result<SecureValue<L, T, GenericResource>, TaintError>
pub fn protect_output<L: PrivacyLevel, T>( &self, output: T, ) -> Result<SecureValue<L, T, GenericResource>, TaintError>
Label the output of an allowed call as protected data tied to the call’s resolved resource.
The label L is chosen by the caller (e.g.
Sensitive); revealing the
value downstream requires a Capability<CanReadSensitive, GenericResource>
minted for the same resource id this call was checked against.
Trait Implementations§
Source§impl Clone for GuardedToolCall
impl Clone for GuardedToolCall
Source§fn clone(&self) -> GuardedToolCall
fn clone(&self) -> GuardedToolCall
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 GuardedToolCall
impl Debug for GuardedToolCall
impl Eq for GuardedToolCall
Source§impl PartialEq for GuardedToolCall
impl PartialEq for GuardedToolCall
impl StructuralPartialEq for GuardedToolCall
Auto Trait Implementations§
impl Freeze for GuardedToolCall
impl RefUnwindSafe for GuardedToolCall
impl Send for GuardedToolCall
impl Sync for GuardedToolCall
impl Unpin for GuardedToolCall
impl UnsafeUnpin for GuardedToolCall
impl UnwindSafe for GuardedToolCall
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