pub struct ToolOutput {
pub content: String,
pub artifacts: Vec<Artifact>,
pub metadata: Metadata,
pub is_error: bool,
}Fields§
§content: String§artifacts: Vec<Artifact>§metadata: Metadata§is_error: boolImplementations§
Source§impl ToolOutput
impl ToolOutput
pub fn text(content: impl Into<String>) -> Self
pub fn json<T: Serialize>(value: &T) -> Result<Self>
pub fn error(message: impl Into<String>) -> Self
pub fn with_artifact(self, artifact: Artifact) -> Self
pub fn with_metadata<K: Into<String>, V: Serialize>( self, key: K, value: V, ) -> Self
Trait Implementations§
Source§impl Clone for ToolOutput
impl Clone for ToolOutput
Source§fn clone(&self) -> ToolOutput
fn clone(&self) -> ToolOutput
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 ToolOutput
impl Debug for ToolOutput
Source§impl Default for ToolOutput
impl Default for ToolOutput
Source§fn default() -> ToolOutput
fn default() -> ToolOutput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolOutput
impl<'de> Deserialize<'de> for ToolOutput
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 ToolOutput
impl RefUnwindSafe for ToolOutput
impl Send for ToolOutput
impl Sync for ToolOutput
impl Unpin for ToolOutput
impl UnwindSafe for ToolOutput
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