pub struct ToolInvocationResult {
pub result: ToolResult,
pub guard: Option<ProcessGuard>,
}Expand description
Wrapper for tool invocation results with optional process guard.
ToolInvocationResult contains both the result of the tool execution and an optional RAII guard for long-running processes.
Fields§
§result: ToolResultResult of the tool invocation
guard: Option<ProcessGuard>Optional process guard (None for simple commands that complete immediately)
Implementations§
Source§impl ToolInvocationResult
impl ToolInvocationResult
Sourcepub fn new(result: ToolResult, guard: Option<ProcessGuard>) -> Self
pub fn new(result: ToolResult, guard: Option<ProcessGuard>) -> Self
Creates a new ToolInvocationResult.
§Arguments
result- Tool execution resultguard- Optional process guard
Sourcepub fn completed(result: ToolResult) -> Self
pub fn completed(result: ToolResult) -> Self
Creates a result without a process guard (for completed commands).
§Arguments
result- Tool execution result
Trait Implementations§
Source§impl Clone for ToolInvocationResult
impl Clone for ToolInvocationResult
Source§fn clone(&self) -> ToolInvocationResult
fn clone(&self) -> ToolInvocationResult
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 ToolInvocationResult
impl RefUnwindSafe for ToolInvocationResult
impl Send for ToolInvocationResult
impl Sync for ToolInvocationResult
impl Unpin for ToolInvocationResult
impl UnsafeUnpin for ToolInvocationResult
impl UnwindSafe for ToolInvocationResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more