pub struct ToolResultBlock {
pub block_type: String,
pub text: Option<String>,
pub source: Option<Value>,
}Fields§
§block_type: String§text: Option<String>§source: Option<Value>Implementations§
Source§impl ToolResultBlock
Constructors/accessors for the two block shapes the model layer understands.
impl ToolResultBlock
Constructors/accessors for the two block shapes the model layer understands.
The source object of an image block is the Anthropic image.source shape
({type: "base64", media_type, data}) verbatim — MCP servers already hand us
that shape, and the runtime’s tool-result renderer reads it back out with
ToolResultBlock::as_image. Building it through these two functions keeps
the producer (Read, the MCP adapter) and the consumer from drifting apart.
Trait Implementations§
Source§impl Clone for ToolResultBlock
impl Clone for ToolResultBlock
Source§impl Debug for ToolResultBlock
impl Debug for ToolResultBlock
Source§impl<'de> Deserialize<'de> for ToolResultBlock
impl<'de> Deserialize<'de> for ToolResultBlock
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 ToolResultBlock
impl Freeze for ToolResultBlock
impl Move for ToolResultBlock
impl RefUnwindSafe for ToolResultBlock
impl Send for ToolResultBlock
impl Sync for ToolResultBlock
impl Unpin for ToolResultBlock
impl UnsafeUnpin for ToolResultBlock
impl UnwindSafe for ToolResultBlock
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