pub struct ExecutionContext {
pub tool_call_id: String,
pub cancellation_token: CancellationToken,
pub working_directory: PathBuf,
pub environment: HashMap<String, String>,
pub metadata: HashMap<String, String>,
}Expand description
Execution context passed to tools during execution
Fields§
§tool_call_id: StringUnique identifier for this tool call
cancellation_token: CancellationTokenCancellation token for early termination
working_directory: PathBufCurrent working directory
environment: HashMap<String, String>Environment variables available to the tool
metadata: HashMap<String, String>Execution metadata
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
pub fn new(tool_call_id: String) -> Self
pub fn with_cancellation_token(self, token: CancellationToken) -> Self
pub fn with_working_directory(self, dir: PathBuf) -> Self
pub fn is_cancelled(&self) -> bool
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
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 ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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