Struct MessageContent
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§
§impl MessageContent
impl MessageContent
Trait Implementations§
§impl Clone for MessageContent
impl Clone for MessageContent
§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 more§impl Debug for MessageContent
impl Debug for MessageContent
§impl Default for MessageContent
impl Default for MessageContent
§fn default() -> MessageContent
fn default() -> MessageContent
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for MessageContent
impl<'de> Deserialize<'de> for MessageContent
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for MessageContent
impl PartialEq for MessageContent
§impl Serialize for MessageContent
impl Serialize for MessageContent
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.