pub enum BlockType {
Text,
Thinking,
ToolUse {
id: String,
name: String,
},
Other(String),
}Expand description
The kind of content block reported by a PartialMessageEvent::BlockStart.
Mirrors the content_block.type field from the Anthropic streaming API.
New block kinds added upstream surface as BlockType::Other – callers
can still recover the type name from the carried string.
Variants§
Text
Regular assistant text – followed by text_delta deltas.
Thinking
Extended-thinking block – followed by thinking_delta deltas.
ToolUse
A tool invocation – followed by input_json_delta deltas streaming the JSON input.
Fields
Other(String)
Any block type not yet modelled. Carries the raw type string.
Trait Implementations§
impl Eq for BlockType
impl StructuralPartialEq for BlockType
Auto Trait Implementations§
impl Freeze for BlockType
impl RefUnwindSafe for BlockType
impl Send for BlockType
impl Sync for BlockType
impl Unpin for BlockType
impl UnsafeUnpin for BlockType
impl UnwindSafe for BlockType
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