pub struct ToolExecutionContext {
pub session: SessionId,
pub run: RunId,
pub progress: ProgressSink,
pub cancellation: CancellationToken,
pub stdin: Option<ToolStdin>,
pub turn_context: Arc<TurnAgentContext>,
/* private fields */
}Fields§
§session: SessionId§run: RunId§progress: ProgressSink§cancellation: CancellationToken§stdin: Option<ToolStdin>§turn_context: Arc<TurnAgentContext>Static agent/model context shared with preparation for this batch.
Implementations§
Source§impl ToolExecutionContext
impl ToolExecutionContext
pub async fn read_artifact( &self, path: &str, offset: u64, limit: u64, ) -> Result<ArtifactReadPage, ToolError>
pub fn retain_attachment( &self, mime_type: impl Into<String>, filename: Option<String>, bytes: &[u8], ) -> Result<ToolAttachment, ToolError>
pub fn retain_validated_attachment( &self, mime_type: impl Into<String>, filename: Option<String>, bytes: &[u8], ) -> Result<ToolAttachment, ToolError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolExecutionContext
impl !UnwindSafe for ToolExecutionContext
impl Freeze for ToolExecutionContext
impl Send for ToolExecutionContext
impl Sync for ToolExecutionContext
impl Unpin for ToolExecutionContext
impl UnsafeUnpin for ToolExecutionContext
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