pub struct MessageContent {
pub text: String,
pub citations: Vec<String>,
pub reasoning: String,
pub attachments: Vec<Attachment>,
pub tool_calls: Vec<ToolCall>,
pub tool_results: Vec<ToolResult>,
pub data: Option<String>,
pub upgrade: Option<Upgrade>,
}Expand description
Standard message content format.
Fields§
§text: StringThe main body/document of this message.
This would normally be written in somekind of document format like markdown, html, plain text, etc. Only markdown is expected by default.
citations: Vec<String>List of citations/sources (urls) associated with this message.
reasoning: StringThe reasoning/thinking content of this message.
attachments: Vec<Attachment>File attachments in this content.
tool_calls: Vec<ToolCall>Tool calls made by the AI (for assistant messages)
tool_results: Vec<ToolResult>Tool call results (for tool messages)
data: Option<String>Non-standard data contained by this message.
May be used by clients for tracking purposes or to represent unsupported content.
This is not expected to be used by most clients.
upgrade: Option<Upgrade>Optional upgrade to realtime communication
Implementations§
Trait Implementations§
Source§impl Clone for MessageContent
impl Clone for MessageContent
Source§fn clone(&self) -> MessageContent
fn clone(&self) -> MessageContent
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 moreSource§impl Debug for MessageContent
impl Debug for MessageContent
Source§impl Default for MessageContent
impl Default for MessageContent
Source§fn default() -> MessageContent
fn default() -> MessageContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageContent
impl<'de> Deserialize<'de> for MessageContent
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 MessageContent
impl PartialEq for MessageContent
Source§impl Serialize for MessageContent
impl Serialize for MessageContent
impl StructuralPartialEq for MessageContent
Auto Trait Implementations§
impl Freeze for MessageContent
impl !RefUnwindSafe for MessageContent
impl Send for MessageContent
impl Sync for MessageContent
impl Unpin for MessageContent
impl !UnwindSafe for MessageContent
Blanket Implementations§
§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.