pub enum MessageRole {
User,
Agent,
}Expand description
The author of a Message.
The two values are the spec’s exhaustive list. A message is either from the user (the human or the calling system) or from the agent (the A2A server). There is no “system” role in v1.0.
Variants§
User
The message was sent by the user (the human or the calling system on the human’s behalf).
Agent
The message was sent by the agent (the A2A server, in response to a previous user message or proactively).
Trait Implementations§
Source§impl Clone for MessageRole
impl Clone for MessageRole
impl Copy for MessageRole
Source§impl Debug for MessageRole
impl Debug for MessageRole
Source§impl Default for MessageRole
impl Default for MessageRole
Source§impl<'de> Deserialize<'de> for MessageRole
impl<'de> Deserialize<'de> for MessageRole
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 Eq for MessageRole
Source§impl PartialEq for MessageRole
impl PartialEq for MessageRole
Source§impl Serialize for MessageRole
impl Serialize for MessageRole
impl StructuralPartialEq for MessageRole
Auto Trait Implementations§
impl Freeze for MessageRole
impl RefUnwindSafe for MessageRole
impl Send for MessageRole
impl Sync for MessageRole
impl Unpin for MessageRole
impl UnsafeUnpin for MessageRole
impl UnwindSafe for MessageRole
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