pub struct Message {
pub message_id: String,
pub context_id: Option<String>,
pub task_id: Option<TaskId>,
pub role: Role,
pub parts: Vec<Part>,
pub metadata: Option<HashMap<String, Value>>,
pub extensions: Option<Vec<String>>,
pub reference_task_ids: Option<Vec<TaskId>>,
}Expand description
A single message in a conversation between user and agent.
Fields§
§message_id: StringUnique identifier for the message, generated by the sender.
context_id: Option<String>Context identifier for grouping related interactions.
task_id: Option<TaskId>Task identifier this message belongs to.
role: RoleSender role.
parts: Vec<Part>Content parts forming the message body.
metadata: Option<HashMap<String, Value>>Optional metadata for extensions.
extensions: Option<Vec<String>>Extension URIs relevant to this message.
reference_task_ids: Option<Vec<TaskId>>Related task IDs for additional context.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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