pub struct MessageView {
pub id: String,
pub role: String,
pub content: String,
}Expand description
View model for a single message
Fields§
§id: String§role: String§content: StringImplementations§
Source§impl MessageView
impl MessageView
Sourcepub fn from_message(msg: Message) -> Self
pub fn from_message(msg: Message) -> Self
Create a MessageView from an A2A Message
Sourcepub fn from_message_with_json_parsing(msg: Message) -> Self
pub fn from_message_with_json_parsing(msg: Message) -> Self
Create a MessageView with JSON parsing for structured responses
Trait Implementations§
Source§impl Clone for MessageView
impl Clone for MessageView
Source§fn clone(&self) -> MessageView
fn clone(&self) -> MessageView
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 MessageView
impl Debug for MessageView
Auto Trait Implementations§
impl Freeze for MessageView
impl RefUnwindSafe for MessageView
impl Send for MessageView
impl Sync for MessageView
impl Unpin for MessageView
impl UnsafeUnpin for MessageView
impl UnwindSafe for MessageView
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