pub struct PersistedToolResult {
pub title: SafeDisplayText,
pub output: String,
pub display: Option<String>,
pub retained_output: Option<RetainedToolOutput>,
pub metadata: Value,
pub truncation: Option<ToolOutputTruncation>,
pub attachments: Vec<ToolAttachment>,
pub additional_messages: Vec<ToolEmittedMessage>,
}Fields§
§title: SafeDisplayText§output: String§display: Option<String>§retained_output: Option<RetainedToolOutput>§metadata: Value§truncation: Option<ToolOutputTruncation>§attachments: Vec<ToolAttachment>§additional_messages: Vec<ToolEmittedMessage>Implementations§
Source§impl PersistedToolResult
impl PersistedToolResult
pub const MAX_OUTPUT_BYTES: usize
pub const MAX_METADATA_BYTES: usize
pub const MAX_ADDITIONAL_MESSAGES: usize = 4
pub const MAX_ATTACHMENTS: usize = 256
pub fn all_attachments(&self) -> impl Iterator<Item = &ToolAttachment>
pub fn validate(&self) -> Result<(), EventSchemaError>
Trait Implementations§
Source§impl Clone for PersistedToolResult
impl Clone for PersistedToolResult
Source§fn clone(&self) -> PersistedToolResult
fn clone(&self) -> PersistedToolResult
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 PersistedToolResult
impl Debug for PersistedToolResult
Source§impl<'de> Deserialize<'de> for PersistedToolResult
impl<'de> Deserialize<'de> for PersistedToolResult
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PersistedToolResult
impl JsonSchema for PersistedToolResult
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PersistedToolResult
impl PartialEq for PersistedToolResult
Source§fn eq(&self, other: &PersistedToolResult) -> bool
fn eq(&self, other: &PersistedToolResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PersistedToolResult
impl Serialize for PersistedToolResult
impl StructuralPartialEq for PersistedToolResult
Auto Trait Implementations§
impl Freeze for PersistedToolResult
impl RefUnwindSafe for PersistedToolResult
impl Send for PersistedToolResult
impl Sync for PersistedToolResult
impl Unpin for PersistedToolResult
impl UnsafeUnpin for PersistedToolResult
impl UnwindSafe for PersistedToolResult
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