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§fn clone(&self) -> ThinkingBlock
fn clone(&self) -> ThinkingBlock
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 ThinkingBlock
impl Debug for ThinkingBlock
Source§impl Default for ThinkingBlock
impl Default for ThinkingBlock
Source§fn default() -> ThinkingBlock
fn default() -> ThinkingBlock
Returns the “default value” for a type. Read more
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 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