#[non_exhaustive]pub enum AssistantBlock {
Text {
text: String,
},
ToolUse {
id: String,
name: String,
input: Value,
},
Thinking {
thinking: String,
},
RedactedThinking {
data: String,
},
ServerToolUse {
id: String,
name: String,
input: Value,
},
WebSearchToolResult {
tool_use_id: String,
content: Value,
},
Unknown,
}Expand description
Content block of an assistant message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Text.
ToolUse
A tool call the CLI runs.
Fields
Thinking
Extended thinking.
RedactedThinking
Encrypted thinking; opaque to the host.
ServerToolUse
A tool the API runs itself (web search, …).
WebSearchToolResult
Result of a server-run web search.
Fields
Unknown
Any other block type.
Trait Implementations§
Source§impl Clone for AssistantBlock
impl Clone for AssistantBlock
Source§impl Debug for AssistantBlock
impl Debug for AssistantBlock
Source§impl<'de> Deserialize<'de> for AssistantBlock
impl<'de> Deserialize<'de> for AssistantBlock
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 Forget for AssistantBlock
impl Freeze for AssistantBlock
impl Move for AssistantBlock
impl RefUnwindSafe for AssistantBlock
impl Send for AssistantBlock
impl Sync for AssistantBlock
impl Unpin for AssistantBlock
impl UnsafeUnpin for AssistantBlock
impl UnwindSafe for AssistantBlock
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