pub enum InputContentBlock {
Text {
text: String,
},
ToolUse {
id: String,
name: String,
input: Value,
},
ToolResult {
tool_use_id: String,
content: Vec<ToolResultContentBlock>,
is_error: bool,
},
Image {
media_type: String,
data: String,
},
Thinking {
text: String,
thought_signature: Option<String>,
},
}Variants§
Text
ToolUse
ToolResult
Image
Base64-encoded image for vision/multimodal requests.
Thinking
Gemini thinking/reasoning block — must be replayed with thoughtSignature for tool calls.
Trait Implementations§
Source§impl Clone for InputContentBlock
impl Clone for InputContentBlock
Source§impl Debug for InputContentBlock
impl Debug for InputContentBlock
Source§impl<'de> Deserialize<'de> for InputContentBlock
impl<'de> Deserialize<'de> for InputContentBlock
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 InputContentBlock
impl PartialEq for InputContentBlock
Source§impl Serialize for InputContentBlock
impl Serialize for InputContentBlock
impl StructuralPartialEq for InputContentBlock
Auto Trait Implementations§
impl Forget for InputContentBlock
impl Freeze for InputContentBlockwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<ToolResultContentBlock>: Freeze,
impl Move for InputContentBlock
impl RefUnwindSafe for InputContentBlock
impl Send for InputContentBlock
impl Sync for InputContentBlock
impl Unpin for InputContentBlock
impl UnsafeUnpin for InputContentBlockwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<ToolResultContentBlock>: UnsafeUnpin,
impl UnwindSafe for InputContentBlock
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