#[non_exhaustive]pub enum AnthropicBlockStart {
Text {
text: String,
},
Thinking {
thinking: String,
},
RedactedThinking {},
ToolUse {
id: String,
name: String,
},
Unknown,
}Expand description
The declaration that opens a content block.
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
Assistant text.
Fields
Thinking
Extended thinking, which belongs to the reasoning channel and never to content.
Fields
§
thinking: StringThinking text present at the point the block opened, for the same reason as
AnthropicBlockStart::Text.
RedactedThinking
Thinking the server has redacted. Carries ciphertext, never plain reasoning, so it is tracked as a block kind and its payload discarded.
ToolUse
A tool call. Its arguments arrive later as input_json_delta fragments.
Fields
Unknown
A block kind this SDK does not recognise. It carries no id or name to emit under, so the block itself contributes nothing; its deltas are still routed by their own tag, which is what keeps an unrecognised channel out of assistant text.
Trait Implementations§
Source§impl Clone for AnthropicBlockStart
impl Clone for AnthropicBlockStart
Source§fn clone(&self) -> AnthropicBlockStart
fn clone(&self) -> AnthropicBlockStart
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 AnthropicBlockStart
impl Debug for AnthropicBlockStart
Source§impl<'de> Deserialize<'de> for AnthropicBlockStart
impl<'de> Deserialize<'de> for AnthropicBlockStart
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 AnthropicBlockStart
impl RefUnwindSafe for AnthropicBlockStart
impl Send for AnthropicBlockStart
impl Sync for AnthropicBlockStart
impl Unpin for AnthropicBlockStart
impl UnsafeUnpin for AnthropicBlockStart
impl UnwindSafe for AnthropicBlockStart
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