pub struct AssistantMessage {
pub content: Vec<ContentBlock>,
pub model: String,
pub parent_tool_use_id: Option<String>,
pub error: Option<String>,
}Expand description
An assistant response message with content blocks.
§Fields
content— List of content blocks in the response.model— The model that generated this response.parent_tool_use_id— Tool use ID if this is a nested subagent response.error— Error type string if the response encountered an error (e.g.,"authentication_failed","rate_limit","server_error").
Fields§
§content: Vec<ContentBlock>Assistant content blocks.
model: StringModel identifier used for generation.
parent_tool_use_id: Option<String>Optional parent tool use identifier.
error: Option<String>Optional error classification string.
Trait Implementations§
Source§impl Clone for AssistantMessage
impl Clone for AssistantMessage
Source§fn clone(&self) -> AssistantMessage
fn clone(&self) -> AssistantMessage
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 AssistantMessage
impl Debug for AssistantMessage
Source§impl<'de> Deserialize<'de> for AssistantMessage
impl<'de> Deserialize<'de> for AssistantMessage
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
Source§impl PartialEq for AssistantMessage
impl PartialEq for AssistantMessage
Source§impl Serialize for AssistantMessage
impl Serialize for AssistantMessage
impl StructuralPartialEq for AssistantMessage
Auto Trait Implementations§
impl Freeze for AssistantMessage
impl RefUnwindSafe for AssistantMessage
impl Send for AssistantMessage
impl Sync for AssistantMessage
impl Unpin for AssistantMessage
impl UnsafeUnpin for AssistantMessage
impl UnwindSafe for AssistantMessage
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