pub struct Message {
pub message_id: String,
pub role: Role,
pub parts: Vec<Part>,
pub context_id: Option<String>,
pub task_id: Option<String>,
pub reference_task_ids: Option<Vec<String>>,
pub metadata: Option<HashMap<String, Value>>,
pub extensions: Option<Vec<String>>,
}Expand description
A single communication message between client and server.
Fields§
§message_id: StringUnique message identifier.
role: RoleSender role.
parts: Vec<Part>Content parts.
context_id: Option<String>Context identifier (conversation/session).
task_id: Option<String>Associated task identifier.
reference_task_ids: Option<Vec<String>>Referenced task identifiers for additional context.
metadata: Option<HashMap<String, Value>>Custom metadata.
extensions: Option<Vec<String>>Extension URIs present in this message.
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