pub enum Content {
Text {
text: String,
},
Image {
data: String,
mime_type: String,
},
Detail {
data: Value,
},
}Expand description
Structured content returned by a tool, aligned with the MCP content
array shape (no envelope, no orchestration/failure/truncation semantics).
Only Text is consumed by the first LLM adapter; Image is shape-reserved
and the adapter reports “not supported” rather than silently dropping it.
Detail carries machine-readable metadata (e.g. edit line numbers) that
the UI can consume but the LLM never sees.
Variants§
Text
Image
Base64-encoded image payload.
Detail
Machine-readable metadata for UI consumption (not sent to the LLM).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
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 Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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