pub struct ChatContentBlock {Show 14 fields
pub type: String,
pub text: Option<String>,
pub citations: Option<Value>,
pub thinking: Option<String>,
pub signature: Option<String>,
pub data: Option<String>,
pub id: Option<String>,
pub name: Option<String>,
pub input: Option<Value>,
pub server_name: Option<String>,
pub caller: Option<Value>,
pub tool_use_id: Option<String>,
pub content: Option<Value>,
pub is_error: Option<bool>,
}Expand description
Anthropic 响应内容块。扁平 struct(方案 §4.1 红线):type:String 判别符 + 全
Option + 动态字段 serde_json::Value,禁 tagged enum。
Fields§
§type: String§text: Option<String>§citations: Option<Value>§thinking: Option<String>§signature: Option<String>§data: Option<String>§id: Option<String>§name: Option<String>§input: Option<Value>json.RawMessage in Go。
server_name: Option<String>§caller: Option<Value>§tool_use_id: Option<String>§content: Option<Value>§is_error: Option<bool>Trait Implementations§
Source§impl Clone for ChatContentBlock
impl Clone for ChatContentBlock
Source§impl Debug for ChatContentBlock
impl Debug for ChatContentBlock
Source§impl Default for ChatContentBlock
impl Default for ChatContentBlock
Source§impl<'de> Deserialize<'de> for ChatContentBlock
impl<'de> Deserialize<'de> for ChatContentBlock
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
Auto Trait Implementations§
impl Freeze for ChatContentBlock
impl RefUnwindSafe for ChatContentBlock
impl Send for ChatContentBlock
impl Sync for ChatContentBlock
impl Unpin for ChatContentBlock
impl UnsafeUnpin for ChatContentBlock
impl UnwindSafe for ChatContentBlock
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