pub struct AnthropicMessage {
pub role: String,
pub content: Value,
}Expand description
One conversation turn.
content is deliberately a Value: Anthropic accepts either a bare string or an array
of typed blocks, and the SDK emits whichever the turn actually needs.
Fields§
§role: String"user" or "assistant". Anthropic has no "system" or "tool" role.
content: ValueA string for text-only turns, or an array of content blocks.
Trait Implementations§
Source§impl Clone for AnthropicMessage
impl Clone for AnthropicMessage
Source§fn clone(&self) -> AnthropicMessage
fn clone(&self) -> AnthropicMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnthropicMessage
impl Debug for AnthropicMessage
Auto Trait Implementations§
impl Freeze for AnthropicMessage
impl RefUnwindSafe for AnthropicMessage
impl Send for AnthropicMessage
impl Sync for AnthropicMessage
impl Unpin for AnthropicMessage
impl UnsafeUnpin for AnthropicMessage
impl UnwindSafe for AnthropicMessage
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