pub enum ToolPresentation {
CodeChange(CodeChange),
WebFetch(Box<WebFetchPresentation>),
}Expand description
UI-only presentation attached to a tool result or preview.
Successful results persist this data with the tool execution record. Preview events remain ephemeral. Both forms stay separate from model-visible tool-result content.
Variants§
CodeChange(CodeChange)
A bounded file change with structured diff hunks.
WebFetch(Box<WebFetchPresentation>)
A bounded normalized client web-fetch result.
Implementations§
Source§impl ToolPresentation
impl ToolPresentation
Sourcepub const fn code_change(&self) -> Option<&CodeChange>
pub const fn code_change(&self) -> Option<&CodeChange>
Returns the structured code change when this is a code-change presentation.
Sourcepub fn web_fetch(&self) -> Option<&WebFetchPresentation>
pub fn web_fetch(&self) -> Option<&WebFetchPresentation>
Returns the normalized fetch result when this is a web-fetch presentation.
Trait Implementations§
Source§impl Clone for ToolPresentation
impl Clone for ToolPresentation
Source§fn clone(&self) -> ToolPresentation
fn clone(&self) -> ToolPresentation
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 ToolPresentation
impl Debug for ToolPresentation
Source§impl<'de> Deserialize<'de> for ToolPresentation
impl<'de> Deserialize<'de> for ToolPresentation
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
impl Eq for ToolPresentation
Source§impl Ord for ToolPresentation
impl Ord for ToolPresentation
Source§fn cmp(&self, other: &ToolPresentation) -> Ordering
fn cmp(&self, other: &ToolPresentation) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ToolPresentation
impl PartialEq for ToolPresentation
Source§impl PartialOrd for ToolPresentation
impl PartialOrd for ToolPresentation
Source§impl Serialize for ToolPresentation
impl Serialize for ToolPresentation
impl StructuralPartialEq for ToolPresentation
Auto Trait Implementations§
impl Freeze for ToolPresentation
impl RefUnwindSafe for ToolPresentation
impl Send for ToolPresentation
impl Sync for ToolPresentation
impl Unpin for ToolPresentation
impl UnsafeUnpin for ToolPresentation
impl UnwindSafe for ToolPresentation
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