pub enum ToolContentItem {
Text {
text: String,
},
Image {
data: String,
mime_type: String,
},
Audio {
data: String,
mime_type: String,
},
Resource {
uri: String,
mime_type: Option<String>,
text: Option<String>,
blob: Option<String>,
},
}Expand description
A single item of content returned from a tool call.
Mirrors the protocol’s Content type but lives in core to avoid circular dependencies.
Variants§
Text
Text content.
Image
Image content (base64-encoded).
Audio
Audio content (base64-encoded).
Resource
Embedded resource reference.
Implementations§
Trait Implementations§
Source§impl Clone for ToolContentItem
impl Clone for ToolContentItem
Source§fn clone(&self) -> ToolContentItem
fn clone(&self) -> ToolContentItem
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 moreAuto Trait Implementations§
impl Freeze for ToolContentItem
impl RefUnwindSafe for ToolContentItem
impl Send for ToolContentItem
impl Sync for ToolContentItem
impl Unpin for ToolContentItem
impl UnwindSafe for ToolContentItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).