pub struct ToolContext {
pub workspace: PathBuf,
pub cancellation: CancellationToken,
pub progress: ProgressSink,
pub approvals: ToolApprovals,
}Fields§
§workspace: PathBuf§cancellation: CancellationToken§progress: ProgressSinkWhere the tool may report short status lines while it runs.
approvals: ToolApprovalsThe session’s approval gate, for a tool relaying a nested agent’s own approval requests.
Implementations§
Source§impl ToolContext
impl ToolContext
Sourcepub fn new(workspace: PathBuf, cancellation: CancellationToken) -> Self
pub fn new(workspace: PathBuf, cancellation: CancellationToken) -> Self
A context whose progress reports go nowhere and whose relayed approval requests are denied.
Trait Implementations§
Source§impl Clone for ToolContext
impl Clone for ToolContext
Auto Trait Implementations§
impl !RefUnwindSafe for ToolContext
impl !UnwindSafe for ToolContext
impl Freeze for ToolContext
impl Send for ToolContext
impl Sync for ToolContext
impl Unpin for ToolContext
impl UnsafeUnpin for ToolContext
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