pub struct ToolExecutionOutcome {
pub status: ToolTerminalStatus,
/* private fields */
}Expand description
Terminal wrapper around the v0.9.1-compatible tool result/error contract.
Exactly one of result and error is populated by the constructors. The
existing UI and transcript paths can keep consuming Self::legacy_result
while audit and orchestration use Self::status directly.
Fields§
§status: ToolTerminalStatusImplementations§
Source§impl ToolExecutionOutcome
impl ToolExecutionOutcome
pub fn from_legacy(result: Result<ToolResult, ToolError>) -> Self
Sourcepub fn cancelled(result: ToolResult) -> Self
pub fn cancelled(result: ToolResult) -> Self
Construct a cancelled outcome while retaining the legacy benign result used to close the provider tool-call pair.
pub fn legacy_result(&self) -> Result<ToolResult, ToolError>
pub fn into_legacy_result(self) -> Result<ToolResult, ToolError>
Trait Implementations§
Source§impl Clone for ToolExecutionOutcome
impl Clone for ToolExecutionOutcome
Source§fn clone(&self) -> ToolExecutionOutcome
fn clone(&self) -> ToolExecutionOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolExecutionOutcome
impl RefUnwindSafe for ToolExecutionOutcome
impl Send for ToolExecutionOutcome
impl Sync for ToolExecutionOutcome
impl Unpin for ToolExecutionOutcome
impl UnsafeUnpin for ToolExecutionOutcome
impl UnwindSafe for ToolExecutionOutcome
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