pub struct ApiMessage {
pub role: Option<String>,
pub content: Value,
pub model: Option<String>,
pub stop_reason: Option<String>,
pub usage: Option<Value>,
pub extra: Map<String, Value>,
}Expand description
The wrapped Anthropic message. content is preserved as raw JSON (string or
block array); the codec is what turns it into typed Blocks.
Fields§
§role: Option<String>§content: Value§model: Option<String>§stop_reason: Option<String>§usage: Option<Value>§extra: Map<String, Value>Trait Implementations§
Source§impl Clone for ApiMessage
impl Clone for ApiMessage
Source§fn clone(&self) -> ApiMessage
fn clone(&self) -> ApiMessage
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 ApiMessage
impl Debug for ApiMessage
Source§impl<'de> Deserialize<'de> for ApiMessage
impl<'de> Deserialize<'de> for ApiMessage
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 ApiMessage
impl PartialEq for ApiMessage
Source§impl Serialize for ApiMessage
impl Serialize for ApiMessage
impl StructuralPartialEq for ApiMessage
Auto Trait Implementations§
impl Freeze for ApiMessage
impl RefUnwindSafe for ApiMessage
impl Send for ApiMessage
impl Sync for ApiMessage
impl Unpin for ApiMessage
impl UnsafeUnpin for ApiMessage
impl UnwindSafe for ApiMessage
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