pub enum AnthropicResponseContentBlock {
Thinking {
thinking: String,
signature: String,
},
Text {
text: String,
citations: Option<Vec<Value>>,
},
ToolUse {
id: String,
name: String,
input: Value,
},
RedactedThinking {
data: String,
},
ServerToolUse {
id: String,
name: String,
input: Value,
},
WebSearchToolResult {
tool_use_id: String,
content: Value,
},
Other(Value),
}Expand description
A content block in the response.
The Anthropic API returns up to 12 different block types. We model the
common ones explicitly and catch the rest as Other so the proxy can
forward them without losing data.
Variants§
Thinking
Text
ToolUse
RedactedThinking
ServerToolUse
WebSearchToolResult
Other(Value)
Catch-all for new/uncommon block types (web_fetch_tool_result, code_execution_tool_result, container_upload, etc.) so the proxy can serialize them back without data loss.
Trait Implementations§
Source§impl Clone for AnthropicResponseContentBlock
impl Clone for AnthropicResponseContentBlock
Source§fn clone(&self) -> AnthropicResponseContentBlock
fn clone(&self) -> AnthropicResponseContentBlock
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<'de> Deserialize<'de> for AnthropicResponseContentBlock
impl<'de> Deserialize<'de> for AnthropicResponseContentBlock
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 AnthropicResponseContentBlock
impl RefUnwindSafe for AnthropicResponseContentBlock
impl Send for AnthropicResponseContentBlock
impl Sync for AnthropicResponseContentBlock
impl Unpin for AnthropicResponseContentBlock
impl UnsafeUnpin for AnthropicResponseContentBlock
impl UnwindSafe for AnthropicResponseContentBlock
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