pub struct ToolResult {
pub success: bool,
pub output: ToolOutput,
pub error: Option<String>,
}Expand description
Result of a tool execution.
Fields§
§success: bool§output: ToolOutput§error: Option<String>Implementations§
Source§impl ToolResult
impl ToolResult
pub fn success(output: impl Into<String>) -> Self
pub fn failure(error: impl Into<String>) -> Self
pub fn with_artifact(self, artifact: ArtifactRef) -> Self
pub fn with_artifacts(self, artifacts: Vec<ArtifactRef>) -> Self
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§impl Debug for ToolResult
impl Debug for ToolResult
Source§impl<'de> Deserialize<'de> for ToolResult
impl<'de> Deserialize<'de> for ToolResult
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 Forget for ToolResult
impl Freeze for ToolResult
impl Move for ToolResult
impl RefUnwindSafe for ToolResult
impl Send for ToolResult
impl Sync for ToolResultwhere
RawVecInner: Sync,
impl Unpin for ToolResult
impl UnsafeUnpin for ToolResultwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ToolOutputPart>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for ToolResult
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