pub struct ThinkingBlock {
pub text: String,
pub signature: Option<String>,
pub redacted_data: Option<String>,
}Expand description
A single assistant extended-thinking block, preserved for verbatim replay.
A normal thinking block carries text (possibly empty when the provider’s
display is “omitted”) plus an opaque signature that must be echoed back
unchanged. A redacted-thinking block instead carries an opaque redacted_data
payload. Both are reconstructed to their exact provider wire shape on replay
(see the Anthropic handler’s build_messages), because the API rejects any
modified thinking block.
Fields§
§text: StringHuman-readable thinking text (empty when display is omitted).
signature: Option<String>Opaque signature Anthropic requires be replayed unchanged (normal blocks).
redacted_data: Option<String>Opaque payload for a redacted_thinking block (replayed as
{type:"redacted_thinking", data:...}); None for normal thinking.
Trait Implementations§
Source§impl Clone for ThinkingBlock
impl Clone for ThinkingBlock
Source§impl Debug for ThinkingBlock
impl Debug for ThinkingBlock
Source§impl Default for ThinkingBlock
impl Default for ThinkingBlock
Source§impl<'de> Deserialize<'de> for ThinkingBlock
impl<'de> Deserialize<'de> for ThinkingBlock
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
Source§impl JsonSchema for ThinkingBlock
impl JsonSchema for ThinkingBlock
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ThinkingBlock
impl PartialEq for ThinkingBlock
Source§impl Serialize for ThinkingBlock
impl Serialize for ThinkingBlock
impl StructuralPartialEq for ThinkingBlock
Auto Trait Implementations§
impl Freeze for ThinkingBlock
impl RefUnwindSafe for ThinkingBlock
impl Send for ThinkingBlock
impl Sync for ThinkingBlock
impl Unpin for ThinkingBlock
impl UnsafeUnpin for ThinkingBlock
impl UnwindSafe for ThinkingBlock
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