pub struct FunctionCallContent {
pub call_id: String,
pub name: String,
pub arguments: Option<FunctionArguments>,
pub protected_data: Option<String>,
}Expand description
A request from the model to call a tool/function.
arguments may be a partial JSON string (during streaming) or a completed
JSON object.
Fields§
§call_id: String§name: String§arguments: Option<FunctionArguments>§protected_data: Option<String>Provider-opaque replay token attached to this call, base64.
The counterpart of TextReasoningContent::protected_data. Gemini 3
returns a thoughtSignature on the part carrying the function call —
the usual placement — and requires it echoed when the call is
replayed; a signature on a preceding thought part is the fallback.
Absent for providers that do not use one.
Implementations§
Source§impl FunctionCallContent
impl FunctionCallContent
pub fn new( call_id: impl Into<String>, name: impl Into<String>, arguments: Option<FunctionArguments>, ) -> FunctionCallContent
Sourcepub fn with_protected_data(
self,
protected_data: Option<String>,
) -> FunctionCallContent
pub fn with_protected_data( self, protected_data: Option<String>, ) -> FunctionCallContent
Attach a provider-opaque replay token (see
Self::protected_data).
Trait Implementations§
Source§impl Clone for FunctionCallContent
impl Clone for FunctionCallContent
Source§fn clone(&self) -> FunctionCallContent
fn clone(&self) -> FunctionCallContent
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 FunctionCallContent
impl Debug for FunctionCallContent
Source§impl<'de> Deserialize<'de> for FunctionCallContent
impl<'de> Deserialize<'de> for FunctionCallContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunctionCallContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunctionCallContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<FunctionCallContent> for Content
impl From<FunctionCallContent> for Content
Source§fn from(v: FunctionCallContent) -> Content
fn from(v: FunctionCallContent) -> Content
Converts to this type from the input type.
Source§impl PartialEq for FunctionCallContent
impl PartialEq for FunctionCallContent
Source§impl Serialize for FunctionCallContent
impl Serialize for FunctionCallContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for FunctionCallContent
Auto Trait Implementations§
impl Freeze for FunctionCallContent
impl RefUnwindSafe for FunctionCallContent
impl Send for FunctionCallContent
impl Sync for FunctionCallContent
impl Unpin for FunctionCallContent
impl UnsafeUnpin for FunctionCallContent
impl UnwindSafe for FunctionCallContent
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