pub enum Part {
Text {
text: String,
thought: Option<bool>,
thought_signature: Option<String>,
},
InlineData {
inline_data: Blob,
},
FileData {
file_data: FileDataRef,
},
FunctionCall {
function_call: FunctionCall,
thought_signature: Option<String>,
},
FunctionResponse {
function_response: FunctionResponse,
thought_signature: Option<String>,
},
ToolCall {
tool_call: Value,
thought_signature: Option<String>,
},
ToolResponse {
tool_response: Value,
thought_signature: Option<String>,
},
ExecutableCode {
executable_code: Value,
thought_signature: Option<String>,
},
CodeExecutionResult {
code_execution_result: Value,
thought_signature: Option<String>,
},
}Expand description
Core primitive types for building requests and parsing responses Content part that can be included in a message
Variants§
Text
Text content
Fields
InlineData
FileData
File data referenced by URI
Fields
§
file_data: FileDataRefFunctionCall
Function call from the model
Fields
§
function_call: FunctionCallThe function call details
FunctionResponse
Function response (results from executing a function call)
Fields
§
function_response: FunctionResponseThe function response details
ToolCall
Server-side tool call from Gemini 3 (built-in tool invocation)
Fields
ToolResponse
Server-side tool response from Gemini 3 (built-in tool result)
Fields
ExecutableCode
Generated code emitted by Gemini code execution.
Fields
CodeExecutionResult
Result emitted by Gemini code execution.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
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
impl StructuralPartialEq for Part
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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