pub enum ToolOutcome {
Success(ToolResult),
Failed(ToolResult),
InProgress {
operation_id: String,
message: String,
},
}Expand description
Result of tool execution - may indicate async operation in progress.
Variants§
Success(ToolResult)
Tool completed synchronously with success
Failed(ToolResult)
Tool completed synchronously with failure
InProgress
Tool started an async operation - must stream status to completion
Implementations§
Source§impl ToolOutcome
impl ToolOutcome
pub fn success(output: impl Into<String>) -> Self
pub fn failed(message: impl Into<String>) -> Self
pub fn in_progress( operation_id: impl Into<String>, message: impl Into<String>, ) -> Self
Sourcepub const fn is_in_progress(&self) -> bool
pub const fn is_in_progress(&self) -> bool
Returns true if operation is still in progress
Trait Implementations§
Source§impl Clone for ToolOutcome
impl Clone for ToolOutcome
Source§fn clone(&self) -> ToolOutcome
fn clone(&self) -> ToolOutcome
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 moreSource§impl Debug for ToolOutcome
impl Debug for ToolOutcome
Source§impl<'de> Deserialize<'de> for ToolOutcome
impl<'de> Deserialize<'de> for ToolOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolOutcome
impl RefUnwindSafe for ToolOutcome
impl Send for ToolOutcome
impl Sync for ToolOutcome
impl Unpin for ToolOutcome
impl UnwindSafe for ToolOutcome
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