pub struct ToolApprovalState {
pub tool_name: String,
pub description: String,
pub action: ApprovalAction,
}Expand description
State for a tool approval widget.
Displays a tool call with approve/reject buttons for human-in-the-loop
AI workflows. Pass to Context::tool_approval
each frame.
Fields§
§tool_name: StringThe name of the tool being invoked.
description: StringA human-readable description of what the tool will do.
action: ApprovalActionThe current approval status.
Implementations§
Trait Implementations§
Source§impl Clone for ToolApprovalState
impl Clone for ToolApprovalState
Source§fn clone(&self) -> ToolApprovalState
fn clone(&self) -> ToolApprovalState
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 moreAuto Trait Implementations§
impl Freeze for ToolApprovalState
impl RefUnwindSafe for ToolApprovalState
impl Send for ToolApprovalState
impl Sync for ToolApprovalState
impl Unpin for ToolApprovalState
impl UnsafeUnpin for ToolApprovalState
impl UnwindSafe for ToolApprovalState
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