pub struct EnhancedToolResult {
pub value: Value,
pub metadata: ResultMetadata,
pub timestamp: u64,
pub tool_name: CompactStr,
pub from_cache: bool,
}Expand description
Enhanced tool result with metadata
Fields§
§value: ValueThe actual tool result
metadata: ResultMetadataQuality metadata
timestamp: u64When result was produced
tool_name: CompactStrTool name that produced this
from_cache: boolWhether this was from cache
Implementations§
Source§impl EnhancedToolResult
impl EnhancedToolResult
pub fn new( value: Value, metadata: ResultMetadata, tool_name: impl Into<CompactStr>, ) -> Self
pub fn from_cache( value: Value, metadata: ResultMetadata, tool_name: impl Into<CompactStr>, ) -> Self
Sourcepub fn is_high_quality(&self) -> bool
pub fn is_high_quality(&self) -> bool
Whether this result is high quality
Sourcepub fn to_summary(&self) -> String
pub fn to_summary(&self) -> String
Convert to a message-friendly format
Trait Implementations§
Source§impl Clone for EnhancedToolResult
impl Clone for EnhancedToolResult
Source§fn clone(&self) -> EnhancedToolResult
fn clone(&self) -> EnhancedToolResult
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 moreSource§impl Debug for EnhancedToolResult
impl Debug for EnhancedToolResult
Source§impl<'de> Deserialize<'de> for EnhancedToolResult
impl<'de> Deserialize<'de> for EnhancedToolResult
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 EnhancedToolResult
impl RefUnwindSafe for EnhancedToolResult
impl Send for EnhancedToolResult
impl Sync for EnhancedToolResult
impl Unpin for EnhancedToolResult
impl UnsafeUnpin for EnhancedToolResult
impl UnwindSafe for EnhancedToolResult
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