pub struct ToolOutput {
pub content: String,
pub truncated: bool,
}Expand description
Wrapper for tool output with truncation metadata.
Fields§
§content: StringThe main content returned by the tool.
truncated: boolWhether the output was truncated due to size limits.
Implementations§
Source§impl ToolOutput
impl ToolOutput
Sourcepub fn new(content: impl Into<String>) -> ToolOutput
pub fn new(content: impl Into<String>) -> ToolOutput
Creates a new output with the given content.
Sourcepub fn truncated(content: impl Into<String>) -> ToolOutput
pub fn truncated(content: impl Into<String>) -> ToolOutput
Creates a truncated output.
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 From<&str> for ToolOutput
impl From<&str> for ToolOutput
Source§fn from(content: &str) -> ToolOutput
fn from(content: &str) -> ToolOutput
Converts to this type from the input type.
Source§impl From<String> for ToolOutput
impl From<String> for ToolOutput
Source§fn from(content: String) -> ToolOutput
fn from(content: String) -> ToolOutput
Converts to this type from the input type.
Source§impl From<WebFetchOutput> for ToolOutput
impl From<WebFetchOutput> for ToolOutput
Source§fn from(output: WebFetchOutput) -> ToolOutput
fn from(output: WebFetchOutput) -> ToolOutput
Converts to this type from the input type.
Source§impl Serialize for ToolOutput
impl Serialize for ToolOutput
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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