pub struct ToolResultEnvelope {
pub payload: Value,
pub truncated: bool,
pub omitted_chars: usize,
pub omitted_items: usize,
pub page_token: Option<String>,
}Expand description
Tool result plus deterministic truncation metadata.
Fields§
§payload: ValuePossibly bounded result payload.
truncated: boolWhether any value was truncated or omitted.
omitted_chars: usizeTotal string characters omitted while bounding the payload.
omitted_items: usizeTotal array items omitted while bounding the payload.
page_token: Option<String>Stable follow-up token describing the first omitted segment.
Implementations§
Source§impl ToolResultEnvelope
impl ToolResultEnvelope
Sourcepub fn bound(payload: Value, config: &ToolResultEnvelopeConfig) -> Self
pub fn bound(payload: Value, config: &ToolResultEnvelopeConfig) -> Self
Bound payload according to config and return truncation metadata.
Trait Implementations§
Source§impl Clone for ToolResultEnvelope
impl Clone for ToolResultEnvelope
Source§fn clone(&self) -> ToolResultEnvelope
fn clone(&self) -> ToolResultEnvelope
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 ToolResultEnvelope
impl Debug for ToolResultEnvelope
Source§impl<'de> Deserialize<'de> for ToolResultEnvelope
impl<'de> Deserialize<'de> for ToolResultEnvelope
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
Source§impl PartialEq for ToolResultEnvelope
impl PartialEq for ToolResultEnvelope
Source§fn eq(&self, other: &ToolResultEnvelope) -> bool
fn eq(&self, other: &ToolResultEnvelope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolResultEnvelope
impl Serialize for ToolResultEnvelope
impl StructuralPartialEq for ToolResultEnvelope
Auto Trait Implementations§
impl Freeze for ToolResultEnvelope
impl RefUnwindSafe for ToolResultEnvelope
impl Send for ToolResultEnvelope
impl Sync for ToolResultEnvelope
impl Unpin for ToolResultEnvelope
impl UnsafeUnpin for ToolResultEnvelope
impl UnwindSafe for ToolResultEnvelope
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